title: VS Code, used with clang++, shows errors in a C++ file that builds fine
body: <p>This is solved. I deleted <code>c_cpp_properties.json</code> and allowed Vs Code to regenerate it by running the command <code>c/c++ configuration (JSON)</code></p>
  
  <hr>
  
  <p>I'm trying to set up Vscode for use with C++ files, following the directions here: </p>
  
  <p><a href="https://code.visualstudio.com/docs/cpp/config-clang-mac" rel="nofollow noreferrer">https://code.visualstudio.com/docs/cpp/config-clang-mac</a></p>
  
  <p>And the file <em>builds and runs okay.</em></p>
  
  <p>The problem is that I get errors (red squiggles) at two places in the file. One of them says "expected ;" (that's on the line with the declared <code>vector&lt;string&gt;</code> ) and the other one says something like "range based loop is C++11 extension"</p>
  
  <p>The sample file they give is</p>
  
  <pre><code>#include &lt;vector&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  int main() 
  {
      vector&lt;string&gt; msg{"Hello", "C++", "World", "from", "VS Code", "and the C++ extension!"};
  
  
      for (const string&amp; word : msg)
      {
          cout &lt;&lt; word &lt;&lt; " ";
      }
      cout &lt;&lt; endl;
  }
  </code></pre>
  
  <p>The tasks.json I used is</p>
  
  <pre><code>{
      // See https://go.microsoft.com/fwlink/?LinkId=733558
      // for the documentation about the tasks.json format
      "version": "2.0.0",
      "tasks": [
          {
              "type": "shell",
              "label": "clang++ build active file",
              "command": "/usr/bin/clang++",
              "args": [
                  "-std=c++17",
                  "-stdlib=libc++",
                  "-g",
                  "${file}",
                  "-o",
                  "${fileDirname}/${fileBasenameNoExtension}"
              ],
              "options": {
                  "cwd": "${workspaceFolder}"
              },
              "problemMatcher": [
                  "$gcc"
              ],
              "group": {
                  "kind": "build",
                  "isDefault": true
              }
          }
      ]
  }
  </code></pre>
  
  <p>c_cpp_properties.json says:</p>
  
  <pre><code>{
      "configurations": [
          {
              "name": "Mac",
              "includePath": [
                  "${workspaceFolder}/**"
              ],
              "defines": [],
              "macFrameworkPath": [
                  "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
              ],
              "compilerPath": "/usr/bin/clang",
              "cStandard": "c11",
              "cppStandard": "c++17",
              "intelliSenseMode": "clang-x64"
          }
      ],
      "version": 4
  }
  </code></pre>