Hello Darin.
22 Mar 98 14:59, Darin McBride wrote to Tim Hutzler:
TH>> Use the following code:
TH>> char name[15];
TH>> gets(name,15); //"name" is the string, "15" is the maximum number of
chars
DM> Um.... what compiler do you use that has "gets(char*, int)"?
I feel your pain. Man, it would drive me nuts having to read all
these posts from guys who keep telling people to use crappy C
functions when they should be using the C++ iostreams.
Wouldn't a good way to handle the above be to use the sizeof operator?
cin.getline( name, sizeof( name ));
-Roger
... I don't suffer from insanity, I enjoy every minute of it.
--- Msged 4.20 beta 3
(1:273/404@fidonet)
---------------
* Origin: Hodge-Podge Support BBS, Upper Darby, Pennsylvania, USA
|