问答详情
源自:5-3 有参与无参

这是啥问题

hello.c: In function 'main':
hello.c:10:15: error: expected declaration specifiers or '...' before numeric constant
     int Learn(5);
               ^

这是错误提示,

函数是

int Learn(int n)

{

    printf("学习了%d门课程",n);

}


主函数调用

int Learn(5);

写法上没啥问题就只有这个提示所以其他的我就省略了

提问者:weixin_慕沐3457710 2019-09-29 19:56

个回答

  • qq_变幻_aeHTZ6
    2019-10-05 20:27:30
    已采纳

    去掉int

  • qq_变幻_aeHTZ6
    2019-10-15 12:53:29

    主函数调用去掉int