-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Erik Hofman schrieb: > Jon Berndt wrote: > >> IIRC, sprintf was a problem for some. Is that still the case? I've >> compiled under Cygwin, >> Borland C++, and I think I've also compiled code that uses sprintf >> under IRIX. >
sprintf is C standard - and very unsafe due to possible buffer overflows. It shouldn't be used. The inofficial (i.e. there's no standard yet AFAIK) C solution is snprintf: > The real problem was snprintf(...) which isn't availble under Winodws: > > #if defined(_WIN32) && !defined(__CYGWIN__) > #define snprintf _snprintf > #endif The real cross platform soultion would be the C++ std::string CU, Chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) iD8DBQFC5fY9lhWtxOxWNFcRAn5KAJ4/ymkStSRQcOrUbIUpqdRy6D11rACgsHYs iveF3b6qmM5Yz393cHfX5gs= =q0Yi -----END PGP SIGNATURE----- _______________________________________________ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d