Re: [Flightgear-devel] itoa? sprintf?

2004-05-27 Thread Mathias Fröhlich
On Donnerstag, 27. Mai 2004 03:41, David Megginson wrote: What is the best way (most supported, cross-platform) to turn an integer into an STL string type? Or, even an ASCII char[]? It seems that itoa() is not totally common. snprintf() is in ISO C99 but not ANSI C -- you could check to

Re: [Flightgear-devel] itoa? sprintf?

2004-05-27 Thread Erik Hofman
Mathias Fröhlich wrote: No itoa is not standard. I have already a patch on top of Jons changes to JSBSim in my local tree which uses stringstream which is standard C++ since ages. The stringstream class would have the advantage that it is not error prone to buffer overflows. Comments on known

Re: [Flightgear-devel] itoa? sprintf?

2004-05-27 Thread Mathias Fröhlich
On Donnerstag, 27. Mai 2004 10:05, Erik Hofman wrote: Mathias Fröhlich wrote: No itoa is not standard. I have already a patch on top of Jons changes to JSBSim in my local tree which uses stringstream which is standard C++ since ages. The stringstream class would have the advantage that it

Re: [Flightgear-devel] itoa? sprintf?

2004-05-27 Thread Frederic Bouvier
Mathias Fröhlich wrote: Mathias Fröhlich wrote: No itoa is not standard. I have already a patch on top of Jons changes to JSBSim in my local tree which uses stringstream which is standard C++ since ages. The stringstream class would have the advantage that it is not error prone

Re: [Flightgear-devel] itoa? sprintf?

2004-05-27 Thread Mathias Fröhlich
On Donnerstag, 27. Mai 2004 11:16, Frederic Bouvier wrote: Mathias Fröhlich wrote: Personally, I prefer std::ostringstream, but itoa, _snprintf (with a leading underscore ), ostrstream and std::ostringstream are in Visual C++ 6 and after : Yep, the ostringstream variant is better ...

[Flightgear-devel] itoa? sprintf?

2004-05-26 Thread Jon Berndt
What is the best way (most supported, cross-platform) to turn an integer into an STL string type? Or, even an ASCII char[]? It seems that itoa() is not totally common. Jon ___ Flightgear-devel mailing list [EMAIL PROTECTED]

Re: [Flightgear-devel] itoa? sprintf?

2004-05-26 Thread David Megginson
Jon Berndt wrote: What is the best way (most supported, cross-platform) to turn an integer into an STL string type? Or, even an ASCII char[]? It seems that itoa() is not totally common. snprintf() is in ISO C99 but not ANSI C -- you could check to see if all of the target platforms have it. ANSI