我为eclipse设置了CDT并编写了一个简单的hello world C程序:
#include <stdio.h>
int main(void){
puts("Hello, world.");
return 0;
}
Run Code Online (Sandbox Code Playgroud)
该程序正确构建和运行,但是eclipse在包含语句的一侧不断显示这个黄色问号,"Unresolved inclusion: <stdio.h>"当我把鼠标悬停在它上面时.
它不会影响程序的运行,但我觉得它很烦人.
有谁知道如何删除它?
我在eclipse下面的代码为C++和它的强调string和cout,并说无法解析.
#include <string>
#include <iostream>
using namespace std;
int main()
{
string s;
s = "hello world";
cout << s;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
谁知道为什么?
编辑:截图
编辑:我找到了一个解决方案,谢谢大家(见答案).

我正在尝试使用Eclipse编辑源代码,在C++ Builder下编译,但遇到Unresolved inclusion问题.
例如,代码如:
#include <vector>
Run Code Online (Sandbox Code Playgroud)
Unresolved inclusion: <vector>在Eclipse IDE中给出错误.C++ Builder确实没有vector文件,而是vector.h编译器使用的文件.
如果我写的话Eclipse IDE没有错误
#include <vector.h>
Run Code Online (Sandbox Code Playgroud)
如何让Eclipse vector.h在看到时使用#include <vector>?