Sorry but what are you trying to do? If you was able to assign it to a variable what would the variable contain or be able to do?
cout is an object of type iostream. |
ostream
If it was iostream there would be no need for cin since it would be input and output.
Last edited on
That didn't prove anything. You used cout(ostream) for output and cin(istream) for input with an iostream object.
What I was saying anyways is that you can't do this:
1 2
|
std::cout << "enter age: ";
std::cout >> age;
|
Last edited on
giblit wrote: |
---|
cout is an object of type iostream.
ostream
|
That was a typo on my part. I had stringstream on the brain.
Last edited on