Hello Tom.
22 Jan 98 17:58, Tom Torfs wrote to Roger Scudder:
EL>> strcat(stringvar, &charvar);
RS>> Very nice solution! I can't understand why I never see
RS>> anyone using it.
TT> Because it doesn't work. The char may or may not be followed by a
nul-byte.
TT> Most likely it will not.
Yeah, I didn't think it through. I did some test's and it worked
so I assumed it was OK.
TT> Try this instead:
TT> strncat(stringvar, &charvar, 1);
TT> Although I still doubt this is conforming code...
I think I'll just stick to the method I used in my reply to the
originator of the thread.
-Roger
... ASCII stupid question and you'll get a stupid ANSI!
--- Msged 4.20 beta 3
(1:273/404@fidonet)
---------------
* Origin: Hodge-Podge Support BBS, Upper Darby, Pennsylvania, USA
|