![](/img/trans.png)
[英]Permission Denied error when trying to compile hello world C program in Mac terminal
[英]Trying to run hello world on C and the output throwing this error on Mac on VS : zsh: parse error near `&&'
我正在尝试在我的 Mac 上的 VSC 上运行一个简单的 C 程序 - Hello World。 每次在输出屏幕上都会抛出这个错误,请理解我是编码新手,嗯,就是这样。
这是屏幕截图:错误
#include <stdio.h>
int main()
{
printf("%s", "Hello World");
return 0;
}
输出:zsh:在`&&'附近解析错误
您的源代码本身是正确的。 假设这是您当前项目中唯一的源代码,问题要么出在不可移植的文件名上,要么出在错误配置或损坏的编译器上。 将您的文件名更改为描述所包含源代码的名称。 像#include <stdio.h>
这样的文件名不仅使调试变得困难,而且在某些操作系统中甚至是不允许的。 虽然它在您的实现中似乎在技术上得到支持,但它仍然可能导致 zsh 行为不正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.