Hi,
I have been using <fstream.h> in stdafx.h,(i'm using MFC) to output to
text files. I have now started to use vectors and when i added
#include <vector>
using namespace std;
to stdafx.h, I found that to compile i had to change <fstream.h> to
<fstream> to get it to compile.
When i run my program i have found that when i do something like:
CString filename,test;
test = "This is a test";
ofstream opdfs;
filename = "C:\\Filepath\\test.txt";
opdfs.open(filename, ios::out|ios::app);
opdfs << test <<endl;
opdfs.close();
It does not write the string to the file but a hex representation
0087385C.
Can anyone tell me why this is happening and how i can solve it?
Thanks In Advance
Macca