Hi,
I wonder if it is required to close an object of ofstream after using it? i.e. similar to FILE in stdio.h of C?
I used to do like this:
Code:
ofsteam fout(filename);
fout<<...;
without fout.close(). Is it right?
When is it required to call close()? If I try to associate fout with another file, shall I call fout.close() first before call fout.open(newfilename)?
Thanks and regards!