I've got a new m1 macbook air, but some things not working on vs code, like using auto
or for each
loop, it's showing
warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
I know that error occurs because of the old selected c++ compiler on vs code, but I changed the version from the setting and tried so hard, and it's not working.
I'm wondering if some had the same issue.
(everything is working fine on xCode)
(everything is working fine on xCode)
then use xCode :)
Why post blog from your alt, and then comment from main? lol
In VS Code settings search for "C++ standard". Select c++20 or c++17
CMD + P
and searchsettings.json
."code-runner.executorMap":
section."cpp"
, write-std=c++17
after whichever compiler you are using."cpp": "cd $dir && clang++ -std=c++17 $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
Thank you brother.