On Apr 30, 3:21 pm, Taras_96 <taras...@gmail.comwrote:
Jesse Liberty writes:
"cin.get() >>myVarOne >myVarTwo; // illegal
The return value of (cin.get() >myVarOne) is an integer, not
an iostream object."
(http://newdata.box.sk/bx/c/htm/ch16.htm)
I would think that that the reason why this wouldn't work is
because cin.get() returns an int, not because (cin.get() >>
mVarOne) is an integer...
Anyone agree?
As others have pointed out, 1) it's not illegal (since myVarOne
and myVarTwo have type char), but 2) it almost certainly doesn't
mean what you want.
I might add in general that, having taken a quick look at the
page, it seems full of errors. I didn't read it in detail, but
of the four or five sentences I did notice, about have were
wrong. I don't think I'd recommend this text.
--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34