- 2
Alternatives to cin? Please include library name
I need alternatives to the <iostream> std cin It only detects the first word of your sentence, and that's bad. Please also give examples on how to use it
3 Réponses
+ 1
Here is one
cin.getline();
https://code.sololearn.com/cp32oQ9205NP/?ref=app
+ 1
Here are two C functions that work like cin and its members...
scanf() - www.cplusplus.com/reference/cstdio/scanf
gets() - www.cplusplus.com/reference/cstdio/gets // Reads only strings.
Perhaps you know them already...
+ 1
Sorry for the late response, but I tried getline, and it worked! Thanks, Manual!