samedi 27 juin 2020

C++ 11 extension warning in VS code

I am trying to compile a c++ program in vs code and I am using mac osx. When I am trying to compile the program it shows "warning: range-based for loop is a C++11 extension [-Wc++11-extensions]".I have also changed the default C_Cpp.default.cppStandard to C++11. But after applying these changes also the error is showing.When I try to compile using "g++ -std=c++11" it is showing that 'cstdalign' file not found. I have included the bits/stdc++.h file.I am attaching the code images as well as my settings in vs code images below.Please help me to get rid of such error.

My c++ code

c_cpp_properties.json file

settings.json file

Aucun commentaire:

Enregistrer un commentaire