bug-lib-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: itoa implementation


From: exa
Subject: Re: itoa implementation
Date: Thu, 5 Jul 2001 04:12:49 +0300

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 04 July 2001 07:20, Greg Chicares wrote:
>
> > In the meantime can anyone suggest another way of doing the same thing -
> > ie:
>
> Try sprintf() .
>
> > converting a simple integer to ascii for writing to file.
>
> If you just want to write a formatted integer to a file,
> use iostreams: then it's as easy as
>   my_stream << my_integer;


Hold there! You know you have to use the glorious <sstream> which gives you 
the istringstream and ostringstream, solving all those stupid conversion 
problems. Just have a look at your copy of libstdc++-3.0 . No more ugly C 
kludgery!

Thanks,

- -- 
Eray Ozkural (exa) <address@hidden>
Comp. Sci. Dept., Bilkent University, Ankara
www: http://www.cs.bilkent.edu.tr/~erayo
GPG public key fingerprint: 360C 852F 88B0 A745 F31B  EA0F 7C07 AE16 874D 539C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE7Q78RfAeuFodNU5wRAq7mAKClAtN3sRTcvHo+s9ik9YAt9pIEyACbBJDb
JX/AYbxacFK/9uonZh6eaHc=
=aVaA
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]