“字符串无法解析” Eclipse中的C ++错误(Eclipse无法解析标准库) [英] "string could not resolved" error in Eclipse for C++ (Eclipse can't resolve standard library)

查看:179
本文介绍了“字符串无法解析” Eclipse中的C ++错误(Eclipse无法解析标准库)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在eclipse中有以下代码,用于c ++,它的下划线是 string cout ,并且无法解析。

  #include< string> 
#include< iostream>

使用namespace std;


int main()
{
string s;
s =hello world;
cout<<< S;
return 0;

}

任何人都知道为什么?



编辑:截图



编辑:我已经找到一个解决方案,谢谢大家(见答案)。

解决方案

问题是我需要同时拥有 minGW和MSY 安装并添加到PATH。



问题现在已修复。


I have the following code in eclipse for c++ and it's underlining string and cout and saying could not be resolved.

#include <string>
#include <iostream>

using namespace std;


int main()
{
    string s;
    s = "hello world";
    cout << s;
    return 0;

}

Anyone know why?

edit: screenshot

Edit: I have found a solution thanks everyone (see answers).

解决方案

The problem was that I needed to have both minGW and MSYS installed and added to PATH.

The problem is now fixed.

这篇关于“字符串无法解析” Eclipse中的C ++错误(Eclipse无法解析标准库)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆