cin.getline() or getline(cin, s) or just cin>>
Also how to get the numeric ascii difference between characters stored in string?
cin.getline() or getline(cin, s) or just cin>>
Also how to get the numeric ascii difference between characters stored in string?
cin works best imo.
You can simply do int x = ‘z’ - ‘a’
What advantage does cin have over getline() and cin.getline(). Also what is the difference between getline() and cin.getline()?
Check these two links
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.