5.13的任務怎么搞
小編把代碼編輯器中的某個方法定義錯了,你能幫他改正嗎?
在代碼編輯器中:
第3行將函數改為外部函數
運行結果為
hello.ctest.c
#include <stdio.h>
#include "test.c"?? //引用test.c文件
static void printLine()???? //這里定義的方法對嗎?
{
?? printf("**************\n");??
}
int main()
{
??? say();
??? return 0;
}
2019-03-28
test.c怎么寫啊
2017-08-09
C語言規定,在沒有指定函數的作用范圍時,系統會默認認為是外部函數,因此當需要定義外部函數時extern也可以省略,任務是要你把第三行的函數改為外部函數,即定義為外部函數
#include <stdio.h>
#include "test.c" ? //引用test.c文件
extern ?void printLine() ? ? //用extern
{
? ?printf("**************\n"); ??
}
int main()
{
? ? say();
? ? return 0;
}