This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: ltoa, itoa, ultoa in gcc


Aaron Case wrote: 

> Do have to write these functions myself or is there something
> supported by GCC that will suffice??

(Fairly obviously) If you're using a common radix such as 10 or 16 then you
can get away with

    char buffer[16];
    snprintf(buffer, 16, "%ld", l);

or similar.

If you're not, and don't want to start from scratch, then get hold of MS's
runtime source from your install CD and have a look how they implemented it
:-)

Rup.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]