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:
without fout.close(). Is it right?Code:ofsteam fout(filename); fout<<...;
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!