為什么右邊調(diào)試總是不對?
#include <stdio.h>
int study()
?{
? ? ?printf("%s\n","小明在慕課網(wǎng)上學習\n");
? ? return 0;
? ? }
int studys(int n)
?{
printf("小明在慕課網(wǎng)上學習了%d門課程\n",n);
? ? ?return 0;
? ? ?
?}
int main()
{
? ? study();
? ? studys(5);
? ? return 0;
}
提示說正確,但是右邊一摩爾提示說調(diào)試錯誤
/249/5442/8LOv/hello.c: In function 'studys':
/249/5442/8LOv/hello.c:9:1: error: stray '\357' in program
printf("小明在慕課網(wǎng)上學習了%d門課程\n",n);
^
/249/5442/8LOv/hello.c:9:1: error: stray '\274' in program
/249/5442/8LOv/hello.c:9:1: error: stray '\214' in program
/249/5442/8LOv/hello.c:9:56: error: expected ')' before 'n'
printf("小明在慕課網(wǎng)上學習了%d門課程\n",n); ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
是咋個回事喃?
2016-08-15
printf("小明在慕課網(wǎng)上學習了%d門課程\n",n);中“,”逗號錯了。
2016-08-12
study()執(zhí)行完return 0; ? ??studys(int n)不執(zhí)行
把int study()改成void?study() 去掉return 0;
2016-08-09
可能是括號的半角有問題,調(diào)節(jié)成英文輸入法重新敲一邊吧