hey this might not even be possible i know that cin will stop reading in data once the user hits space or enter but is it possible to change that from a space to a character of some sort
if you could please provide and example or link me to where there is one
thanks in advance :D
using character to end cin statement
Started by PeaceFrogs, Feb 11 2009 04:24 PM
1 reply to this topic
#1
Posted 11 February 2009 - 04:24 PM
|
|
|
#2
Posted 11 February 2009 - 04:45 PM
You can use cin.unsetf(ios_base::skipws) to have cin keep reading strings when whitespace is encountered. cin.get() can also be used to input characters into an array of characters. cin.getline() is another option. cin.getchar() is a third if you want to process the input manually.


Sign In
Create Account

Back to top









