ich hab folgendes Problem: ich möchte eine int-Zahl in einen string umwandeln.
Wie geht das?
Gruß Franz
--
__________________________________________________________
News suchen, lesen, schreiben mit http://newsgroups.web.de
unter Windows gibt es die Funktion itoa. Damit sollte das gehen.
char *_itoa(
int value,
char *string,
int radix
Parameters
value
Number to be converted.
string
String result.
radix
Base of value; must be in the range 2 - 36.
Return Value
Each of these functions returns a pointer to string. There is no error
return.
Remarks
The _itoa, _i64toa, and _ui64toa function convert the digits of the given
value argument to a null-terminated character string and stores the result
(up to 33 bytes) in string. If radix equals 10 and value is negative, the
first character of the stored string is the minus sign ( - ). _itow,
_i64tow, and _ui64tow are wide-character versions of _itoa, _i64toa, and
_ui64toa respectively.
Alternativ geht es vielleicht auch mit sprintf. Einen gross genugen buffer
anlegen und als Formatstring "%d" und als Argument eben die Variable
Alex
"Franz Mayer" <f.m...@web.de> wrote in message
news:3cd39a64$1...@netnews.web.de...
> ich hab folgendes Problem: ich möchte eine int-Zahl in einen string
> umwandeln. Wie geht das?
man itoa
cu,
Shortie
--
F: Was ist ein Mathematiker?
A: Ein Gerät das Kaffee in Behauptungen umwandelt.