Quote:Original post by JoshuadQuote:Original post by Telastyn
Based on what you've learned, it's probably a good assumption. [edit: and certainly a good enough basis to go on for a while]
As for being 'correct'...
Ok...what is 'correct' then? My purpose in asking questions is to go from my educated assumptions to having a clean and proper understanding. Please enlighten me.
I'm not sure I can provide clean and proper understanding for Sneftel's original quote:
Quote:
learn exactly how the << operator is implemented?
Since it can be interpreted a few ways.
Most basically though, the << and >> operators are the C bitshift operators. C++ allows operator overloading. Simply put, it allows programmers to redefine the behavior of operators like the bitshift operators for classes (like the stream classes that define cout/cin) for which the operation is meaningless.
There's then a lot of minutiae regarding how C++ deals with binary operators, how overloading is done, the semantics behind the chaining trick to make cout << "foo" << a << b; work... But if you've not covered the arrow (->), then that's perhaps stuff left until later.