Can someone tell me why is it, where something is a variable, and notCode:cin >> something???Code:cin << something
Because, I got confuse with the cout object as cout uses the symbol <<. Thanks in advance![]()
This is a discussion on cin >> something within the C++ Programming forums, part of the General Programming Boards category; Can someone tell me why is it Code: cin >> something , where something is a variable, and not Code: ...
Can someone tell me why is it, where something is a variable, and notCode:cin >> something???Code:cin << something
Because, I got confuse with the cout object as cout uses the symbol <<. Thanks in advance![]()
The "arrow" created by ">>" or "<<" indicates which direction the data goes. So "cout << x" sends the value of x to the output, "cint >> x" takes the input and fills it into x.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.