2021年3月10日星期三

Vs Code C++ extension giving random errors

Hope this is not a stupid question, new to cpp!

I followed vs code cpp installation guide: https://code.visualstudio.com/docs/cpp/config-clang-mac

Code, btw compiles correctly:

#include <iostream>  #include <vector>   #include <string>    using namespace std;    int main()  {       vector<string> msg { 'Hello', 'C++', 'World', 'from', 'VS Code', 'and the C++ extension!' };         for (const string& word : msg)       {            cout << word << " ";       }       cout << endl;  }  

Compiler:

Compiler

But got those mistakes:

Error 1

Error 2

Any clues why I got these mistakes?

https://stackoverflow.com/questions/66575098/vs-code-c-extension-giving-random-errors March 11, 2021 at 09:07AM

没有评论:

发表评论