I see several problems:
1. <iostream.h> is not part of standard C++. The 1998 C++ standard uses <iostream> (no ".h")
2. Both <iostream> and <string> are in the "std" namespace. To use anything in the standard namespace, you need to append "std::" before the function you are using (example std::cout instead of just cout)
Try:
Code:
#include <iostream>#include <string>int main (){ std::string mystring; mystring = "Hello There!"; std::cout << mystring << std::endl; return 0;}
Also, int main() is correct. According to the c++ standard main returns an integer. If you omit the "return 0" statement, the compiler will add it for you.
I'd suggest getting a couple of good c++ books. "Accelerated c++" is a good one to start with. Try www.accu.org for book reviews.
Hope this helps,
Scott