List:MySQL++« Previous MessageNext Message »
From:Gregory Haley Date:December 17 2004 8:26pm
Subject:RE: 64 bit - a place to watch
View as plain text  
> 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
 

Thread
64 bit - a place to watchChris Frey15 Dec
  • Re: 64 bit - a place to watchWarren Young16 Dec
    • Re: 64 bit - a place to watchChris Frey17 Dec
      • Re: 64 bit - a place to watchWarren Young17 Dec
        • Re: 64 bit - a place to watchChris Frey17 Dec
          • Re: 64 bit - a place to watchWarren Young17 Dec
          • RE: 64 bit - a place to watchGregory Haley17 Dec