為什么編譯max.c的時(shí)候提示錯(cuò)誤
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)這句代碼括號(hào)里面的不應(yīng)該是分號(hào),應(yīng)該是逗號(hào)。
推薦你一個(gè)C/C++網(wǎng)站http://www.cjjjs.cn/和群140903513,網(wǎng)站有很多不錯(cuò)的文章和資源(電子書和IDE),QQ群可以在群上問(wèn)問(wèn)題,會(huì)有人解答你的問(wèn)題,慕課網(wǎng)沒有C/C++群,不利于同學(xué)們的問(wèn)題交流。