J
John Simeon
I understand that to creat a file output stream for example, I have to
include <fstream> and then:
ofstream fout;
which will create an object of type ofstream that I can use to interact with
a file.
My question concerns cout and cin. Clearly by intuition, these are also
objects? Is it possible to define an object of the same type of cin and cout
and use them similarly? What are those types and what would the definitions
to create those objects look like?
Thanks.
include <fstream> and then:
ofstream fout;
which will create an object of type ofstream that I can use to interact with
a file.
My question concerns cout and cin. Clearly by intuition, these are also
objects? Is it possible to define an object of the same type of cin and cout
and use them similarly? What are those types and what would the definitions
to create those objects look like?
Thanks.