Wade Carpenter wrote in a message to All:
WC> I'm using Tc++ v.3 in dos, and I'm trying to read
WC> a directory name, like "C:\WINDOWS\SYSTEM" for example,
WC> using gets(dirw).
Don't use gets, use fgets instead - it allows you to define a maximum string
length (but you'll have to strip the newline yourself).
Make sure your string is properly defined:
char s[80];
or
char *s;
s = malloc(256);
if (s==NULL)
return 1;
or something with new s[] or whatever, but you'll have to ask someone who
programs in C++ for the details :-)
greetz,
Tom
tomtorfs@mail.dma.be
--- timEd/2 1.10+
---------------
* Origin: 80X86 BBS 32-15-24.62.32 V.34/V.FC (24h/24h) (2:292/516)
|