From: bowman AT erehwon DOT foo (bowman) Newsgroups: comp.os.msdos.djgpp Subject: Re: Newbie question about strings in C .. References: <396119a7 DOT 31315113 AT news> <396230e0 DOT 2867154 AT news DOT wins DOT uva DOT nl> User-Agent: slrn/0.9.5.7 (UNIX) Lines: 9 Message-ID: Date: Tue, 04 Jul 2000 20:08:58 GMT NNTP-Posting-Host: 208.4.224.199 X-Trace: newsfeed.slurp.net 962741338 208.4.224.199 (Tue, 04 Jul 2000 15:08:58 CDT) NNTP-Posting-Date: Tue, 04 Jul 2000 15:08:58 CDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Evert Glebbeek wrote: > >You can't allocate a string on the fly using a standard library >function. Also, if you use scanf() or gets(), you can't specify how >large the string you've allocated is, so there's no way to keep your >user from entering characters until he overflows your string. I fgets(buf, sizeof buf, stdin);