為什么這么寫還是報錯,求大佬看看
#include <stdio.h>
#include "test.c" ? //引用test.c文件
extern void printLine() ? ? //這里定義的方法對嗎?
{
? ?printf("**************\n"); ??
}
int main()
{
? ? say();
? ? return 0;
}
#include <stdio.h>
#include "test.c" ? //引用test.c文件
extern void printLine() ? ? //這里定義的方法對嗎?
{
? ?printf("**************\n"); ??
}
int main()
{
? ? say();
? ? return 0;
}
2018-10-20
舉報
2018-10-20
hello.c從test.c調用函數,所以是extern? ? ? ?test.c要設置一個靜態函數,所以加static
2018-10-20
注意觀察一下編寫時左上角有個test.c,不是hello.c