VSCode 配置 C/C++ 头文件路径
步骤
- 在项目根目录创建
.vscode/c_cpp_properties.json文件 - 添加以下内容(以 Linux/Clang 为例):
{
"configurations": [
{
"name": "Linux",
"includePath": ["${workspaceFolder}/**", "${workspaceFolder}/include"],
"compilerPath": "/usr/bin/clang",
"cStandard": "c17",
"cppStandard": "c++17"
}
],
"version": 4
}
Example
├── include
│ └── handle.hpp
├── README.md
└── src
├── cuda_error_check.h
└── main.cu 评论
评论功能尚未配置:在 GitHub 仓库开启 Discussions,并按项目 README 里的步骤填好
src/consts.ts 即可启用(基于 Giscus,评论需要 GitHub 账号)。