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