M
Mark
Hi
take a look at http://c-faq.com/misc/hexio.html, specifically at:
static char retbuf[33];
char *p;
p = &retbuf[sizeof(retbuf)-1];
....
Why do we have to keep additional pointer 'p' to a 'retbuf'? If we fill in
the 'retbuf' and then return it from the function ('return retbuf'), it will
always point at the very first element of the buffer, and we can safely use
from the caller.
Am I wrong?
take a look at http://c-faq.com/misc/hexio.html, specifically at:
static char retbuf[33];
char *p;
p = &retbuf[sizeof(retbuf)-1];
....
Why do we have to keep additional pointer 'p' to a 'retbuf'? If we fill in
the 'retbuf' and then return it from the function ('return retbuf'), it will
always point at the very first element of the buffer, and we can safely use
from the caller.
Am I wrong?