為什么編譯max.c的時候提示錯誤
max.c:2:13: error: parameter ‘a(chǎn)’ has just a forward declaration
?int max(int a;int b)
???????????? ^
max.c: In function ‘max’:
max.c:4:8: error: ‘a(chǎn)’ undeclared (first use in this function)
???? if(a>b){
??????? ^
max.c:4:8: note: each undeclared identifier is reported only once for each function it appears in
2015-10-31
?int max(int a;int b)這句代碼括號里面的不應該是分號,應該是逗號。
推薦你一個C/C++網(wǎng)站http://www.cjjjs.cn/和群140903513,網(wǎng)站有很多不錯的文章和資源(電子書和IDE),QQ群可以在群上問問題,會有人解答你的問題,慕課網(wǎng)沒有C/C++群,不利于同學們的問題交流。