::> for some reason I can't seem to input a string with spaces in it.
::> am I missing something?
::> like:
::> char testvar[100];
::> cin >> testvar;
::> how come I only get the first word?
cin only reads up to the first white-space character.
try:
cin.getline(testvar, 99, '\n');
That will read up to 99 characters from cin, into testvar, stopping when the
enter key is pressed.
# Herbert Bushong harchon@centuryinter.net [TEAM OS/2]
- Blackbeard's BBS Intelec: 239:600/0
+ Fido: 1:19/19 http://www.intelec.com/software/
---
RM 1.31 2508 Let the meek inherit the Earth, I want the stars!
---------------
* Origin: Blackbeard's BBS - Ville Platte, LA - 318-468-3385 (1:19/19)
|