0
I dont understand cin why do i use it and how do i use it?
9 Réponses
+ 6
variable "a" will get user input value.
+ 6
Output is decided by the user.
+ 5
It's the opposite of cout , used for input instead of output:
int a;
cin>>a;
cout<<a;
+ 4
cin gets input from a user for a variable.
int age;
cout <<"Please enter your age";
cin>>age;
where age is a variable.
+ 2
What will happen when i use cin
+ 2
What will the output be
+ 2
cin is an object of class ifstream that uses method >>(insertion) to get input from user
+ 2
no the >> insertion function does it but cut is an object that
is used to access the >> method
you can consider it as a pre defined operator function of class istream and cut is an object thus
as in general case an object is used to access member function and parameter is passed in it the sales the case here
+ 1
Its a way to take the user input and store it in a variable.