I've started to explore c++ recently and I was using cin to get input from a user but it always misses the first character for example:
string name;
cin >> name;
cout << name << endl;
(if i wrote Tom for example on the console)
the result will be only : om
Can anybody help me with this kind of problem?
string name;
cin >> name;
cout << name << endl;
(if i wrote Tom for example on the console)
the result will be only : om
Can anybody help me with this kind of problem?
Comment