Thanks Magmai Kai Holmlor,
Looks like you''ve fixed my problem. It was something to do with that namespace stuff and the ''std::'' bit. I haven''t got a clue what any of that is, as my C++ book doesn''t mention any of it.
I''ll have to have a look for an online tutorial on namespaces, I guess. Recomendations?
The working Visual C++ snippet was:-
#include <iostream>
#include <string>
main()
{
std::string str;
using namespace std;
str = "Hello World!";
cout << str << endl;
return 0;
}
Thanks all!
Help with string class in VC++
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement