c++ - Adding basic #include commands to VS Code -


i working on game , decided download vs code. however, vs code not familiar basic #include concepts such #include <iostream>. have no idea how add because i'm not used vs code , other programming software used @ skills center had #include commands saved. do?

current code:

    { "configurations": [     {         "name": "mac",         "includepath": [             "/usr/include",             "/usr/local/include",             "${workspaceroot}",         ],         "defines": [],         "intellisensemode": "clang-x64",         "browse": {             "path": [                 "/usr/include",                 "/usr/local/include",                 "${workspaceroot}"             ],             "limitsymbolstoincludedheaders": true,             "databasefilename": ""         }     },     {         "name": "linux",         "includepath": [             "/usr/include",             "/usr/local/include",             "${workspaceroot}"         ],         "defines": [],         "intellisensemode": "clang-x64",         "browse": {             "path": [                 "/usr/include",                 "/usr/local/include",                 "${workspaceroot}"             ],             "limitsymbolstoincludedheaders": true,             "databasefilename": ""         }     },     {         "name": "win32",         "includepath": [             "${workspaceroot}"         ],         "defines": [             "_debug",             "unicode"         ],         "intellisensemode": "msvc-x64",         "browse": {             "path": [                 "${workspaceroot}"             ],             "limitsymbolstoincludedheaders": true,             "databasefilename": ""         }     } ], "version": 2 

}

from file posted, assume have ms-vscode.cpptools extension installed. issue not vscode "not being familiar #include", it's configuration of should header files.

you need add paths c++ standard library headers (and other library's headers want use) "includepath" array platform you're using in file posted, before ide provide parse support them.

for linux around /usr/include, set, assume you're using windows. you'll have around them, they'll in windows sdk installation directory (see here discussion on windows sdk), or somewhere like: c:/program files (x86)/microsoft visual studio 14.0/vc/include. it'll depend on installation of headers are.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -