fstream and ofstream

What is the difference between using fstream and ofstream for file output? Does it mean that you don't have to add the ios::out flag when using fstream since it will be for both input and output?

If you know you're only going to do output should you use ofstream only?
Same for input?

Last edited on
fstream I meant for both input and output. But if you know you will need just input purpose or only output, no need to use the general.

Think i get it know I misread the File section with IO.
Thanks anyway
Topic archived. No new replies allowed.