He won't hit any size restrictions with a 1024 buffer and that string. ints cant hold numbers big enough to fill up 1024 spaces.
[edited by - DukeAtreides076 on May 26, 2004 7:58:27 PM]
Adding an int to a string
quote:Original post by DukeAtreides076
He won't hit any size restrictions with a 1024 buffer and that string. ints cant hold numbers big enough to fill up 1024 spaces.
But it's possible the destination string could contain more than just integers. snprintf is the safer, still-C alternative. And why not be safe when you can be?
[edited by - Zipster on May 26, 2004 8:21:21 PM]
your not save with sprintf, you could print i.e. 200 64bit-integers, using full size, into a string, which has a size of 1024...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement