Mail Archives: djgpp/1999/09/18/17:24:14
Hello,
> Hi, I'm quite new to programming in C++ and I have got a question about
> strings: How can I convert a number into a string,
you can use itoa/ftoa to convert from Integer to Ascii.
but it is easier using sprintf.
sprintf ( the_string, "%i", the_integer );
bye,
--
Jorge Iván Meza Martínez
nuevearanitas AT hotpop DOT com
Roland Moritz wrote:
>
e.g. there is a variable
>
> int i;
>
> then how do I make a string which contains the number-variable i in
> ASCII-code, so that I can use it, for instance, to give it out with the
> Allegro textout-function (Or is there another way to do this)? (Hope you
> know what I mean...something like the "str"-Function in Pascal, if this
> helps anyone...)
- Raw text -