cin | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

cin

I'm not exactly sure how this works. It says something about the input device. I'm new to programming. Could anyone help clear this up?

3rd Jan 2017, 1:23 AM
Enrique Man
Enrique Man - avatar
2 Answers
+ 8
e.g. int x; cout << "Please input an integer to x" << endl; cin >> x; cout << "Your input is " << x; // while cout is used to print information to the screen, cin is used to read information from the user and store them into variables.
3rd Jan 2017, 6:41 AM
Hatsy Rei
Hatsy Rei - avatar
+ 6
cin is an object for standard input from the keyboard
3rd Jan 2017, 2:02 AM
Filip
Filip - avatar