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
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
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
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
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 ...
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]
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