Lookign at:
http://www.cplusplus.com/reference/clibrary/cstdio/sprintf/
for string (%.Ns) precision.
When I use sizeof or a #define length in the precsion it reads it as actual text.
Why is this? What are the rules of this? Does it have to be an integer value only?
i.e. -
buffer[50];
sprintf (buffer, "%.sizeof(buffer)s", string);
or
#define MAX_LEN
sprintf (buffer, "%.MAX_LENs", string);
Thanks