Author: Alessandro Scotti
Date: 14:44:16 08/29/04
Go up one level in this thread
On August 29, 2004 at 12:04:47, Uri Blass wrote: >2)Is it safe to use fgets()? >I remember that it is not safe to use gets() and I think that for the same >reason it is not safe to use fgets() fgets() is safe. The difference with gets() is that the latter doesn't take the buffer size as a parameter, so it can overflow your buffer. Other minor difference s are that gets() removes end of line characters from the string, while fgets() leaves them there, and also that gets() can only read from stdin.
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.