简体   繁体   中英

CodeLite does not recognize any c++ code

I have just downloaded Code::Blocks on my new PC and written my hello world. 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. How can I fix it?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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