Ok i've just started using files, and I can't get this bit of code to work.
When I run this code it comes up saying "fatal error C1083: Cannot open include file: 'fstream.h': No such file or directory"Code:#include<String.h> #include<fstream.h> int main( ) { string str(“Hello”); ofstream outFile(“C:\\My Documents\\C++\\test.txt”, ios::out); outFile << str; outFile.close( ); return 0; }
I've tried numorous things, but none of them to seem to work. Anyone help?
Thanks.