(January 26, 2018 at 6:08 pm)bennyboy Wrote: There's an error in that code. The words "hello world" are missing.
That fancy cout line in your while loop, though, that's just hacks-- I never knew you could do it like that!
Yeah, it's a neat little trick. The comma operator (not to be confused by the comma separator, which is by far the most common version) evaluates the expression before the comma and discards the return value (if there is one), and then evaluates the expression after the comma and keeps the return value of that one (if there is one).
So, since cout doesn't return and simply spits things out to standard output, it will give you a prompt each loop.