这是啥问题

来源:5-3 有参与无参

weixin_慕沐3457710

2019-09-29 19:56

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);

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

写回答 关注

2回答

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

    去掉int

    weixin...

    如果是无参函数好像会出运行成功而没有这个提示

    2019-10-08 19:37:47

    共 2 条回复 >

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

    主函数调用去掉int

C语言入门

C语言入门视频教程,带你进入编程世界的必修课-C语言

926299 学习 · 20799 问题

查看课程

相似问题