In memory of. If you want to output variable of type int or double, cin actually automatically stopped in front of the character type, quite scanf style. For example, the following code:
#include <iostream>
using namespace std;
int main() {
double x;
cin >> x;
cout << x;
return 0;
}
Input 12.0abcdefg, 12 is output.
Cried ......