Skip to main content
GameDev.net gamedev.net
🔒 Locked

I/O Streams

Started by CheeseMonger Aug 6, 2003 at 7:01 PM 2 replies 350+ views
Original Post
CheeseMonger
CheeseMonger
Would an iofstream object, for example, automatically disassociate itself from the file it is attached to on destruction or does the programmer have explicitly call it''s close() member before destruction? Cheers for any help. - CheeseMonger
CheeseMonger
C-Junkie
C-Junkie
fstream will close the file it opened when it goes out of scope. (ie destruction. or deconstruction. hmmmmmmm...?)
CheeseMonger
CheeseMonger
Destruction. Deconstruction. Redeconstruction. Deredeconstruction. Whatever.

Cheers for the answer...

- CheeseMonger
CheeseMonger
sSimontis
sSimontis
You will need to construct and destruct it. Only when you work ona new file.

Scott Simontis
Big Joke: C#
Scott SimontisMy political blog

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.