jeudi 18 juin 2020

Error in finding C++ files/ files do not exist after moving to c++11

I recently got into competitive programming and when I used 'auto' in vs code it always gave me a warning: "warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]." I also couldn't do lamda expressions and coun't used tuples as it claimed 'no template named 'tuple'' and use of undeclared identifier 'make_tuple.' I went to stack overflow and followed the directions. In which I changed the settings.json by adding: "

 "code-runner.executorMap":{
        "cpp": "cd $dir && g++ -std=c++17 $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
    }," 

I also used "cppStandard": "c++11" in my c_cpp_properties.json. However, it is now throwing me problems like fatal error: 'cstdalign' file not found. I tried making new files but the files keep on coming and coming and I got incredibly frustrated copy and pasting the files. I also got

    'uchar.h' file not found
 #include <uchar.h>,  fatal error: 
      'bits/cpu_defines.h' file not found
#include <bits/cpu_defines.h>

and so on.

Is there anywhere where I can download all of these files so I do not need to copy and paste it. Or if im doing something wrong. It is also well to mention I use a mac. Maybe I should switch to windows? im not too sure. Thank you

Aucun commentaire:

Enregistrer un commentaire