简体   繁体   English

CodeLite无法识别任何C ++代码

[英]CodeLite does not recognize any c++ code

I have just downloaded Code::Blocks on my new PC and written my hello world. 我刚刚在新PC上下载了Code :: Blocks并写了我的世界。 My code is: 我的代码是:

#include <iostream>
using namespace std;

int main()
{
cout << "hello world!";
return 0;
}

My text does not get highlighted and when I tried to build and run the program this appeared in the terminal: 我的文字没有突出显示,当我尝试构建和运行程序时,它出现在终端中:

                      sh: 1: /directory/I/saved/in/helloworld: Permission denied

                      process returned 126 (0x7E)  execution time : 0.002 s
                      Press Enter to continue.

My compiler is gcc and I had the same problem in CodeLite. 我的编译器是gcc,我在CodeLite中也遇到了同样的问题。 How can I fix it? 我该如何解决?

总结一下:我要做的就是在文件中添加一个扩展名(在我的情况下为“ .cpp”),因此它是可执行的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM