I am trying to run the following code:
#include <iostream(greater than sign)
using namespace std;
int main(void){
cout << "Hello World!" << endl;
return 0;
}
When I run it through Output, it executes perfectly fine. But, I want to run it in Terminal so I can have input options. However, when I set "Code-runner: Run In Terminal" to true and try to run the code, I get this error message:
$ cd "c:\Users\User\Desktop\CS101\" && g++ helloworld.cpp -o helloworld && "c:\Users\User\Desktop\CS101\"helloworld
bash: cd: c:\Users\User\Desktop\CS101" && g++ helloworld.cpp -o helloworld && c:UsersUserDesktopCS101"helloworld: No such file or directory
I'm not sure what the problem is, because when I create a C file in the same folder and run it via gcc (filename).c -> ./a.exe , it also works fine. Anyone know what the problem is?