"C:\Dev-CPP\employee.txt" may not correct , do not you need escape \ using \\ ?
ithelp
Nearly a Posting Maven
2,230 posts since May 2006
Reputation Points: 769
Solved Threads: 128
It would be good if you could tell us what problems you're facing. So i'm presuming that employee.txt is an infile? Please upload it.
zandiago
Nearly a Posting Maven
2,480 posts since Jun 2007
Reputation Points: 129
Solved Threads: 26
Hey, Are you sure that the file is being opened?
Because Your Code Doesnt Test whether it has opened it
if (myfile.is_open()) { /* ok, proceed with output */ }
You should have an if statement like the above to know that you have opened the file successfully.
Sky Diploma
Practically a Posting Shark
865 posts since Mar 2008
Reputation Points: 673
Solved Threads: 131