c - 编译“Hello World”程序时出错
问题描述
我正在尝试使用 CodeBlocks IDE 在我的 Mac 上运行以下简单程序:
1. #include <stdio.h>
2. int main()
3. {
4. // printf() displays the string inside quotation
5. printf("Hello, World!");
6. return 0;
7. }
但我收到以下错误:
错误:预期标识符或“(”
由于机器正在尝试编译,我认为 gcc 编译器工作正常。
解决方案
删除行号,这就是问题所在。
推荐阅读
- sql - 超过 100 万条记录的表性能缓慢:索引是否错误?
- java - 逆向量3
- python - 在 Python 的嵌套函数中使用全局变量
- visual-studio-code - 有没有办法在 vscode-languageclient 的 node_modules 文件夹中观察文件系统事件?
- python - 在没有新窗口的情况下使用文件关联执行 Python 脚本
- android - 受信任的 Web 活动 - 屏幕方向
- php - Walmart.io 身份验证问题 - 无法验证请求中的身份验证签名
- r - 使用来自多个数据框的变量和合并过滤结果的自定义数据框 - Reprex 可用
- amazon-web-services - Awslogs 状态文件不断损坏
- python - 使用 Gunicorn 在 Heroku 上部署 Django