4 ms·
That code is just as easily converted to use snprintf, and then you don't need to worry about the . Or -1.
by tedunangst 13y ago
That code is just as easily converted to use snprintf, and then you don't need to worry about the . Or -1.
- epsylon 13y agosnprintf is C99 IIRC. Which means legacy C89 compilers (or worse!) don't have it.
- panzi 13y agoWhich brings it back again to my initial comment: "I don't understand why functions like gets and sprintf weren't removed from the standard and headers a long time ago." And by a long time I mean before 1989 (certainly before 1999).