Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5049

C++ - running on VS code with code runner

$
0
0

I am trying to compile and run C++ programs on VS code. I have my compiler set up, and I am trying to use the terminal for taking the user input. I tried to change the settings config for code runner by updating the

"code-runner.runInTerminal": true

After this, the terminal refuses to run the code. I understand the error that I am getting, but I have no clue on how I can fix it. Here is the program I am trying to run:

#include <bits/stdc++.h>using namespace std;int main(){   int x;   cin >> x;   cout << "Output:" << x;}

The output I get after I try to run it is:

cd "d:\Github\problem-solving\HackerRank\Cpp\" && g++ pointers.cpp -o pointers && "d:\Github\problem-solving\HackerRank\Cpp\"pointers bash: cd: d:\Github\problem-solving\HackerRank\Cpp" && g++ pointers.cpp -o pointers && d:Githubproblem-solvingHackerRankCpp"pointers: No such file or directory

Any kind of help would be appreciated, thank you.


Viewing all articles
Browse latest Browse all 5049

Trending Articles