From: Gregory Haley Date: December 17 2004 8:26pm Subject: RE: 64 bit - a place to watch List-Archive: http://lists.mysql.com/plusplus/3836 Message-Id: <001701c4e476$a2fb7980$9c01a8c0@stratos> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1250" Content-Transfer-Encoding: 7bit > Subject: Re: 64 bit - a place to watch > > > On Fri, Dec 17, 2004 at 12:37:31PM -0700, Warren Young wrote: > > Chris Frey wrote: > > > > >sql_string.h is the only place I found sprintf's, so here's the > > >patch. > > > > I can't accept this one. snprintf() is nonstandard. VC++ calls it > > _snprintf(), and other platforms lack an analog of it entirely. > > Perhaps it is better to use ostringstream after all? > The ostringstream object is very powerful. It provides excellent type saftey, and you never have to worry about having sufficient storage allocated to contain what you are creating. It's only drawback is that there is quite a bit of overhead, but this is insignificant when using it in a limited sense. Herb Sutter has a very good discussion of the comparison of sprintf, snprintf, ostreams in "Exceptional C++ Style", Items 2 and 3. ciao! greg. Gregory Haley -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.296 / Virus Database: 265.5.4 - Release Date: 12/15/2004