第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

多文件編譯報(bào)錯(cuò)。

http://img1.sycdn.imooc.com//55791b6b000143f009310431.jpg

報(bào)錯(cuò):warning: implicit declaration of function 'maxNum' is invalid in C99 [-Wimplicit-function-declaration]

代碼如下:

是gcc版本問(wèn)題么?是不是hello.c中要引入max.o?怎么引入?

wubiao@xMac0?cStudy$cat?hello.c?
#include?<stdio.h>
int?main()
{
	int?a?=?33;
	int?b?=?20;
	int?m;
	m?=?maxNum(a,b);
	printf("the?max?value?is?%d\n",m);
	return?0;
}
wubiao@xMac0?cStudy$cat?max.c?
int?maxNum(int?a,int?b)
{
	return?a>b?a:b;
}
wubiao@xMac0?cStudy$gcc?-c?max.c?-o?max.o
wubiao@xMac0?cStudy$ls
hello.c????max.c??????max.o??????test.c?????whichDay.c
wubiao@xMac0?cStudy$gcc?max.o?hello.c?
hello.c:7:6:?warning:?implicit?declaration?of?function?'maxNum'?is?invalid?in?C99?[-Wimplicit-function-declaration]
????????m?=?maxNum(a,b);
????????????^
1?warning?generated.


正在回答

3 回答

按照老師后面的步驟,先定義一個(gè)max.h頭文件,然后在hello.c中寫入該頭文件就好了

1 回復(fù) 有任何疑惑可以回復(fù)我~
#1

supercoko

按老師講的話,在講解“.h”頭文件之前老師就是這樣做的,但并沒(méi)有錯(cuò)!!
2016-03-18 回復(fù) 有任何疑惑可以回復(fù)我~
#2

supercoko

并不用 寫入max.h
2016-03-18 回復(fù) 有任何疑惑可以回復(fù)我~

這個(gè)需要請(qǐng)教高手~

0 回復(fù) 有任何疑惑可以回復(fù)我~

貌似高端。

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

多文件編譯報(bào)錯(cuò)。

我要回答 關(guān)注問(wèn)題
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)