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.
Example
string result; int number = 42; sprintf(result, "The number is %d", number);
Index | Copyright © 2005 CadSoft Computer GmbH |