Can we use fstream instead of ifstream and ofstream? If so, why that i&o exist?
Can we use fstream instead of ifstream and ofstream? If so, why that i&o exist?
fstream can do both input and output, while ifstream is input only and ofstream is output only.
Originally Posted by Ancient Dragon
I think what he is trying to say is why do they have ifstream and ofstream when we can use fstream.
My guess would be that if you have a program that does one or maybe the other it wouldn't be necessary to add a bigger library.
Yes this is what I mean.Originally Posted by Starr
And how much big that lib is you think?