> 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