c++ - 当头文件的文件夹位于同一目录中时检测到包含错误?
问题描述
目录看起来像这样
cpr
include
cpr
other code stuff
the code I'm working on
我试过添加
${workspaceFolder}/**
${workspaceFolder}/cpr/include
${workspaceFolder}/cpr/**
${workspaceFolder}/cpr/
到includePath 无济于事。
代码:
using namespace std;
#include <iostream>
#include <cpr>
int main(int argc, char** argv) {
auto r = cpr::Get(cpr::Url{"https://api.github.com/repos/whoshuu/cpr/contributors"},
cpr::Authentication{"user", "pass"},
cpr::Parameters{{"anon", "true"}, {"key", "value"}});
r.status_code; // 200
r.header["content-type"]; // application/json; charset=utf-8
r.text; // JSON text string
}
预期:代码编译没有问题。
实际的:#include errors detected. Please update your includePath.
解决方案
推荐阅读
- javascript - 如何防止数组中的重复项?
- javascript - Jquery 只获取一个动态输入值而不是多个动态输入值
- android - 如何区分应用程序重新启动与应用程序从后台恢复
- javascript - React webpack 生产版本无法启动
- c# - ASP.NET Core 整洁 if/else 取决于对象是否已初始化?
- snowflake-cloud-data-platform - 雪花创建表,其中包含从 Select 语句填充的列子集
- python - 如何将json输出写入python中的csv文件?
- ruby-on-rails - 无法打开到 localhost:9200 的 TCP 连接(无法分配请求的地址 - “localhost”端口 9200 的连接(2))
- go - Golang - 我如何从 mux 获得授权?
- sql-server - 如何像在常规 SQL Server 上一样在 Sql Azure 上强制进行传输中加密?