Mail Archives: djgpp/1997/03/15/12:43:35
> I prompt the user for input eg.
>
> char FullName[256];
> cout << "Enter Your Full Name\n:";
> cin.get(FullName,256);
>
> and the program compiles without error, but when I run it it skips
> right by the cin.get() and displays
>
> Enter Your Full Name
> :
> (The rest of the program)
>
Try something like this:
char FullName[256];
cin.ignore( SOME_BIG_NUMBER );
cout << "Enter Your Full Name\n:";
cin.get(FullName,256);
Hope it helps,
Luis Espinal
--
Luis++ = ( lespin03 AT solix DOT fiu DOT edu XOR
luis_espinal AT armsfl DOT ccmail DOT compuserve DOT com );
What does not kill us makes us stronger
...abort, retry, ignore ?
- Raw text -