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 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.
> >
> > I used to have troubles with stringstream (MipsPro 7.2.1) but I think I
> > got a pretty good emulation based on strstream (I know that one isn't
> > safe, but what else to do?).
> 
> The alternative is to use that sprintf stuff from ISO-C. There is a high risc 
> of buffer overflows if you are not *very* careful with every change in that 
> area. Not that I care for security in this case but just for core dumps or 
> unexpected behavour ...
> Jon fixed one of them shortly ...
> 
> > I'm now at MipsPro 7.4 which doesn't have any problems with it.
> > (I think I was the last one having that problem)
> So, you think it would be save for those SGI machines now ...
> 
> Any objections?
> How about the Windows world?

Personally, I prefer std::ostringstream, but itoa, _snprintf (with a leading 
underscore ),
ostrstream and std::ostringstream are in Visual C++ 6 and after :

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt__itoa.2c_._i64toa.2c_._ui64toa.2c_._itow.2c_._i64tow.2c_._ui64tow.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_crt__snprintf.2c_._snwprintf.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang98/html/SSTREAM_ostringstream.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang98/html/_iostream_ostrstream.asp

-Fred



_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to