title: Compiler not recognizing std namespace even if it is included in the code in Visual Studio Code 2022
body: <p>I am trying to run the following code:</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  using std::cout;
  int main( ) {
    int n =0;
   
  std::cout&lt;&lt;n&lt;&lt;std::endl;
  system(&quot;pause&gt;0&quot;);
  return 0;
  
  }
  </code></pre>
  <p>As you can see, I've included the std namespace. I have also toyed around and went in and edited my JSON file and the compiler path. I already have MYSYS2 with MINGW64 installed. However, I continue to get this error: <a href="https://i.stack.imgur.com/TEyyG.png" rel="nofollow noreferrer">COMPILER ERROR</a></p>
  <p>Here is my JSON files ...
  c_ppp_properties.json:</p>
  <pre><code>{
  &quot;configurations&quot;: [
      {
          &quot;name&quot;: &quot;Win32&quot;,
          &quot;includePath&quot;: [
              &quot;${workspaceFolder}/**&quot;
          ],
          &quot;defines&quot;: [
              &quot;_DEBUG&quot;,
              &quot;UNICODE&quot;,
              &quot;_UNICODE&quot;
          ],
          &quot;compilerPath&quot;: &quot;C:\\Users\\antho\\Documents\\gcc for windows\\mingw64\\bin\\g++.exe&quot;,
          &quot;cStandard&quot;: &quot;c17&quot;,
          &quot;cppStandard&quot;: &quot;c++17&quot;,
          &quot;intelliSenseMode&quot;: &quot;windows-gcc-x64&quot;
      }
  ],
  &quot;version&quot;: 4
  </code></pre>
  <p>}</p>
  <p>my second json file(tasks.json):</p>
  <pre><code>{
  &quot;tasks&quot;: [
      {
          &quot;type&quot;: &quot;cppbuild&quot;,
          &quot;label&quot;: &quot;C/C++: cl.exe build active file&quot;,
          &quot;command&quot;: &quot;cl.exe&quot;,
          &quot;args&quot;: [
              &quot;/Zi&quot;,
              &quot;/EHsc&quot;,
              &quot;/nologo&quot;,
              &quot;/Fe${fileDirname}\\${fileBasenameNoExtension}.exe&quot;,
              &quot;${file}&quot;
          ],
          &quot;options&quot;: {
              &quot;cwd&quot;: &quot;${fileDirname}&quot;
          },
          &quot;problemMatcher&quot;: [
              &quot;$msCompile&quot;
          ],
          &quot;group&quot;: {
              &quot;kind&quot;: &quot;build&quot;,
              &quot;isDefault&quot;: true
          },
          &quot;detail&quot;: &quot;Task generated by Debugger.&quot;
      }
  ],
  &quot;version&quot;: &quot;2.0.0&quot;
  </code></pre>
  <p>}</p>
  <p><a href="https://i.stack.imgur.com/ZyGLL.png" rel="nofollow noreferrer">CONFIGURATION SETTINGS</a></p>
  <p>I know this question has been asked before, but my problem is different and is not solved using the solutions within that similar question. Please point me in the right direction.</p>
  <p>This is the <a href="https://i.stack.imgur.com/MEyXD.png" rel="nofollow noreferrer">compiler path</a></p>