You can't merely #include <string> (or other standard C++ headers) in Visual C++ and then use these things as you normally would with a *real* compiler. Instead of using string:

#include <string>

struct node {

    string s;
    node * next;
}

... you have to either put std:: in front of every reference to the standard library:

#include <string>

struct node {

    std::string s;
    node * next;
}

... or use the standard namespace after you include your first standard C++ header:

#include <string>
using namespace std;

struct node {

    string s;
    node * next;
}

Back to TIWICHLOTIETWT


Keywords: MFC, Visual C++, #include , #include <string>, string.h, string, basic_string, standard C++ library, C++ standard library, CString, namespaces, namespace std