-=> Neil Heller wrote to Manish Malik <=-
NH> MM> char *s;
NH> MM> gets(s);
NH> That's going from bad to worse. You've only allocated two bytes (in a
NH> 16-bit system or 4 bytes in a 32-bit system) to hold what the user
NH> types. That's guaranteed to tromp on somebody's memory.
Actually he's allocated 0 bytes for it! since gets() takes a pointer, and
s was defined as a char pointer. If he used "gets(&s)", then at least
he'd have the 2 or 4 bytes. ;-)
... My hard disk is full! Maybe I'll try this message section thing.
---
1:109/570)
---------------
* Origin: * My Place BBS * Bowie, Md USA * V.34 * (301)805-1602 *
|