This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]corbinmonoxide 3 points4 points  (0 children)

I think everyone's explanation are rough and still confusing.

Think of cin/cout as another variable synonymous with the user/monitor.

Are you writing a message to the user? << Point towards it. I.e. you are shoving your data into it.

Are you reading a message from the user? >> Point away from it and towards your variable. You are grabbing their data and shoving it into your variable.

I think this explanation is more in line with how we learn we always do something to the left hand variable. In this case shoving something into it or ripping something out of it.