Mar 27, 2014 at 10:59pm
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?
Mar 27, 2014 at 11:05pm
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 Mar 27, 2014 at 11:06pm
Mar 27, 2014 at 11:24pm
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 Mar 27, 2014 at 11:29pm
Mar 28, 2014 at 4:30pm
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 Mar 28, 2014 at 4:52pm