In case of an error, sprintf returns -1.
Format string
See printf.
Binary zero characters
Note that sprintf can not return strings with embedded binary zero characters (0x00). If the resulting string contains a binary zero character, any characters following that zero character will be dropped. Use printf if you need to output binary data.
Příklad
string result; int number = 42; sprintf(result, "The number is %d", number);
OBSAH | Translation © 2001 ELCAD v.o.s., Copyright © 2001 CadSoft Computer GmbH |