http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



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

Re: problem solved ^_^



On Fri, 6 Oct 2000, KingFish wrote:

>   is there the possibility to convert float, int, etc. directly into
>   chars ??? And if, how???

int const c_ConvertBufferSize=256;

...

char buffer[ c_ConvertBufferSize ];
snprintf( buffer, c_ConvertBufferSize, "%i", someInteger );


snprintf( buffer, c_ConvertBufferSize, "%g", someFloat   );

--
Marc Hernandez

=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once

To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html