delorie.com/archives/browse.cgi | search |
Comments: | Authenticated sender is <mert0407 AT sable DOT ox DOT ac DOT uk> |
From: | "George Foot" <george DOT foot AT merton DOT ox DOT ac DOT uk> |
To: | "Ilari Kaartinen" <ililka AT mantta DOT fi> |
Date: | Thu, 8 Apr 1999 19:11:12 +0000 |
MIME-Version: | 1.0 |
Subject: | Re: better than gets()? |
CC: | djgpp AT delorie DOT com |
X-mailer: | Pegasus Mail for Win32 (v2.42a) |
Message-Id: | <E10VJLP-0005gz-00.1999-04-08-19-16-04@mail10.svr.pol.co.uk> |
Reply-To: | djgpp AT delorie DOT com |
On 8 Apr 99 at 14:13, Ilari Kaartinen wrote: > gets() crashes whole program if the string taken is longer than the > buffer. Better func' for taking th full *string*. If you use `fgets', you can specify not just the buffer to store the data in, but also the size of the buffer and the stream to read from (`gets' reads from `stdin'). -- George
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |