課程
/后端開發
/C
/C語言入門
按照printline()前改為extern,say()前加static的方式改的
2021-06-25
源自:C語言入門 5-13
正在回答
不用去管多余的報錯,慕課網前面就有答案報錯的問題,正確與否得看自己電腦上的IDE怎么顯示的,正常情況下都不會有那些多余的報錯
#include <stdio.h>
static void say(){
? ? void printLine();
? ? printf("I love imooc\n");
? ? printf("good good study!\n");
? ? printf("day day up!\n");
? ? printLine();
}
在test.c中在printLine前加void
無警告代碼
#include "test.c"? ?//引用test.c文件
extern void printLine()? ? ?//這里定義的方法對嗎?
{
? ?printf("**************\n");? ?
int main()
? ? say();
? ? return 0;
extern void printLine();//多加的部分
舉報
C語言入門視頻教程,帶你進入編程世界的必修課-C語言
1 回答為什么會出現運行成功,輸入錯誤
2 回答這段為什么運行錯誤而在其他軟件上可以運行?
10 回答為什么會出現運行成功,輸入錯誤呢?
3 回答為什么運行之后什么東西都沒有呢
2 回答為什么運行成功,輸出錯誤
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2022-02-23
不用去管多余的報錯,慕課網前面就有答案報錯的問題,正確與否得看自己電腦上的IDE怎么顯示的,正常情況下都不會有那些多余的報錯
2021-09-18
#include <stdio.h>
static void say(){
? ? void printLine();
? ? printf("I love imooc\n");
? ? printf("good good study!\n");
? ? printf("day day up!\n");
? ? printLine();
}
在test.c中在printLine前加void
2021-08-05
無警告代碼
#include <stdio.h>
#include "test.c"? ?//引用test.c文件
extern void printLine()? ? ?//這里定義的方法對嗎?
{
? ?printf("**************\n");? ?
}
int main()
{
? ? say();
? ? return 0;
}
#include <stdio.h>
extern void printLine();//多加的部分
static void say(){
? ? printLine();
? ? printf("I love imooc\n");
? ? printf("good good study!\n");
? ? printf("day day up!\n");
? ? printLine();
}