cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Do you .close() streams?
Do you .close() streams?
Jul 11, 2011 at 9:49am UTC
Catfish
(666)
Hello all, was just wondering.
Since a destructor automatically calls a file stream's close() function do you think it's necessary to close it manually? And if yes, why.
Thanks.
Jul 11, 2011 at 10:07am UTC
Athar
(4466)
It's unnecessary, unless you want the file to close before the stream object goes out of scope.
Topic archived. No new replies allowed.