When converting an int like so:
char a[256];
sprintf(a, \"%d\", 132);
what\'s the best way to determine how large a should be? I a
I see this conversation is a couple of years old, but I found it while trying to find an answer for MS VC++ where snprintf cannot be used to find the size. I'll post the answer I finally found in case it helps anyone else:
VC++ has the function _scprintf specifically to find the number of characters needed.