為什么提示錯(cuò)誤,請(qǐng)幫分析下
#include <stdio.h>
/* 考慮一下哪個(gè)輸出該用無參函數(shù)哪個(gè)輸出該用有參函數(shù)呢? */
int number(int n)
? ?{ ??
? ? printf("小明在慕課網(wǎng)上學(xué)習(xí)%d課\n",n);
? ? return 0;
? ?}
? ?
int learing()
{?
? ?printf("%s\n","小明在慕課網(wǎng)上學(xué)習(xí)");
? ?return 0;
}
? ?
int main()
{
learning();
number(5);
?return 0;
}
warning: no newline at end of file
/tmp/cc2kEazG.o: In function `main':
hello.c:(.text+0x43): undefined reference to `learning'
collect2: ld returned 1 exit status
2015-09-04
int learing()
{?
? ?printf("%s\n","小明在慕課網(wǎng)上學(xué)習(xí)");
? ?return 0;
}
中l(wèi)earing()少了個(gè)n,這是主函數(shù)中的learning();
2015-09-04
英語是體育老師教的