"Chris Wolstenholme" <chris@xxxxxxxxxxxxxxxxxxxx> writes: > You need to specify the namespace for the string (which happens to be std). > > There are two options: > > include<string.h> You mean '#include<string>' , without the '.h' > > int main() > { > std::string s1("hello world"); > > return 0; > } [snip]