title: VSCode - C++ code runner doesn't work correctly when code-runner.runInTerminal is enabled
body: <p>C++ Code Runner in VS Code doesn't seem to be able to build the executable correctly if the &quot;run in terminal&quot; option is set to be true - <code>&quot;code-runner.runInTerminal&quot;: true</code>.</p>
  <p>By default, the output window is read-only, so if my C++ program has no user input via <code>cin</code>, the code runner is able to build the <code>foo.exe</code> correctly from a <code>foo.cpp</code> file. However, if I add the above configuration to the <code>settings.json</code> file (to enable user-input, more details <a href="https://www.freecodecamp.org/news/how-to-compile-your-c-code-in-visual-studio-code/" rel="nofollow noreferrer">here</a>), it appears that the <code>.exe</code> executable is not built.</p>
  <p>This is the sample code I used -</p>
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  
  int main() {
    cout&lt;&lt; &quot;Hello World&quot; &lt;&lt; endl;
    return 0;
  }
  </code></pre>
  <p>Output -</p>
  <p><strong>Successful Execution</strong></p>
  <pre><code>[Running] cd &quot;c:\Users\Manish\Documents\Development\Github\HackerRank\C++\&quot; &amp;&amp; g++ 1.cpp -o 1 &amp;&amp; &quot;c:\Users\Manish\Documents\Development\Github\HackerRank\C++\&quot;1
  Hello World
  
  [Done] exited with code=0 in 2.235 seconds
  </code></pre>
  <p><strong>Unsuccessful Execution (same file)</strong> -</p>
  <pre><code>Manish@manish-lenovo MINGW64 ~/Documents/Development/Github/HackerRank/C++ (master)
  $ cd &quot;c:\Users\Manish\Documents\Development\Github\HackerRank\C++\&quot; &amp;&amp; g++ 1.cpp -o 1 &amp;&amp; &quot;c:\Users\Manish\Documents\Development\Github\HackerRank\C++\&quot;1      
  bash: cd: c:\Users\Manish\Documents\Development\Github\HackerRank\C++&quot; &amp;&amp; g++ 1.cpp -o 1 &amp;&amp; c:UsersManishDocumentsDevelopmentGithubHackerRankC++&quot;1: No such file or directory
  </code></pre>
  <p>Screenshots (if required) -</p>
  <p><img src="https://user-images.githubusercontent.com/11348778/86523799-9f1e4680-be3f-11ea-8c70-6fde615a0334.png" alt="err4" /></p>
  <p><img src="https://user-images.githubusercontent.com/11348778/86523802-acd3cc00-be3f-11ea-90fb-03bc8d9376d8.png" alt="err3" /></p>
  <p>What's going wrong?</p>