|
代码helper.h:
/*
* helper.h - Header for helper.c
*/
void msg (void)
代码helper.c:
/*
* helper.c - Helper code for howdy.c
*/
#include <stdio.h>
void msg (void)
{
printf ("This message set for jupiter.\n");
}
代码howdy.c:
/*
* howdy.c - Modifed "Hello,World!"
*/
#include <stdio.h>
#include "helper.h"
#include <string.h>
int main (void)
{
printf ("Hello, Linux programming world!\n");
msg();
return 0;
}
错误提示:
[root@Tomcat ~]# gcc howdy.c helper.c -o howdy
howdy.c: In function 'msg':
howdy.c:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
howdy.c:12: error: expected '{' at end of input |
|