Jinx,

When writing a text file to the a: drive, you will need to include fstream.h or it will fail. Also, you may want to consider using an endl at the end of your output stream, like this:
...