Also, the first include should not begin with a capital letter.
You should be using
#include <fstream>
if you're using a modern C++ compiler, and finally

string str(“Hello”);
Backward sloping double quotes are not the same as "Hello"

11-21-2006

Daved

It should be <string>, not <String.h> (or <string.h>). Only the first one declares the C++ string class that you are using. When you fix that and <fstream>, you will need to specify the std namespace. The best solution is to prefix standard library names with std:: (like std::string, std::ofstream and std::ios::out). You can also just add using namespace std; under your includes, which is acceptable for small beginner programs.

>> My guess it's the free visual studio express, and you haven't downloaded the platform SDK.
VC++ 7.1 (2003) and later don't accept the non-standard <fstream.h> header, so that error will occur with or without the platform SDK being downloaded.

11-21-2006

ManiacBR

Cheers guys!

That's it working now, just had to remove the ".h" and add namespace like you said. And yes i am using the free version :)