hi,
I have this code:
The problem is: I have open "out.data" with in and out mode (because then I have to read it too). But the write doesn't work! the file isn't create. I notice that if I open out in mode append and in, it all OK! But in the rest of program, I have to read file and write strings at the begining (and not append strings)Code:fstream in ("in.data",ios_base::in);
fstream out ("out.data", ios_base::out|ios_base::in);
in.seekg (0, ios::end);
size =in.tellg();
block = new char [size];
in.seekg (0, ios::beg);
in.read (block, size);
out.write (block, size);
What's happen?
thanks