"string could not resolved" error in Eclipse for C++ (Eclipse can't resolve standard library)

c++, eclipse

Solution

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

The problem is now fixed.

Problem

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).

Original source

Related problems