简体   繁体   中英

Visual Studio Code update include path

This is my code. But it is showing to update include path,I don't know how to.

#include <iostream>

int main() {
std::cout << "test this!";
return 0;
  1. If your compiler is VScode, I suggest you could perform the following operations.

1.1 Press "Shift+Ctrl+p" Input: C++Configurations, select UI interface.

1.2 Just add the path of the header file you need in the include path.

1.3 If you don not know, you could enter commands on the command line:

gcc -v -E -x c++ -

Then, copy and paste the obtained results into the include path

在此处输入图像描述

  1. If your compiler is Visual Studio, you could add the include path in Properties->VC++ Directories->Include Directories .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM