輸出沒錯,這是warning怎么處理?
hello.c:?In?function?'getPeachNumber': hello.c:4:5:?warning:?type?of?'n'?defaults?to?'int'?[-Wimplicit-int] ?int?getPeachNumber(n)
hello.c:?In?function?'getPeachNumber': hello.c:4:5:?warning:?type?of?'n'?defaults?to?'int'?[-Wimplicit-int] ?int?getPeachNumber(n)
2020-07-13
舉報
2020-07-14
int?getPeachNumber(n)改成int?getPeachNumber( int n)試試
2020-07-23
你好。c:在函數(shù)“getPeachNumber”中:
你好。c:2:5:警告:“n”的類型默認為“int”[-Wimplicit int]
int getPeachNumber(n)? ?意思就是n沒有定義數(shù)據(jù)類型? 默認是int?