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 see if all of > the target platforms have it. ANSI C sprintf() should also be OK, since > you can predict the maximum length for an integer, but the security heads > might want to chime in here.
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 problems with stringstream on platforms we want to support? I would prefer to use this one if it is not a compatibility problem. Greetings Mathias -- Mathias Fröhlich, email: [EMAIL PROTECTED] _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel