我创建了 simple.cpp 文件并尝试在 vs 代码中打印 Hello world 但它显示错误消息。我不知道如何解决它。请帮帮我!
这是我的 C++ 代码:
#include<iostream>
using namespace std;
int main(){
cout<<"Hello World";
return 0;
};
这是错误信息:
Program 'simple.exe' failed to run: Access is deniedAt line:1 char:87
+ ... g\C++\" ; if ($?) { g++ simple.cpp -o simple } ; if ($?) { .\simple }
+ ~~~~~~~~.
At line:1 char:87
+ ... g\C++\" ; if ($?) { g++ simple.cpp -o simple } ; if ($?) { .\simple }
+ ~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed