1. Remove the .h from iostream and fstream.
2. You're using cout wrong, you need to use the << operator between stuff to print out.
3. You need to add usingnamespace std; if you aren't going to specify std::cout, std::endl, std::ifstream, etc.
It's on this line:main(). Of course any C++ code you look at should have the correct version of this line(Another hint). Also based on the quality of this code, perhaps you should brush up on language basics before you try somthing like file I/O
1 C:\Dev-Cpp\include\c++\3.4.2\iostream:1, from C:\Dev-Cpp\include\c++\3.4.2\iostream from C:/Dev-Cpp/include/c++/3.4.2/iostream:1, from C:/Dev-Cpp/include/c++/3.4.2/iostream
1 C:\Dev-Cpp\include\c++\3.4.2\iostream:1, from C:\Dev-Cpp\include\c++\3.4.2\iostream from C:/Dev-Cpp/include/c++/3.4.2/iostream:1, from C:/Dev-Cpp/include/c++/3.4.2/iostream