I was wondering if I could capture a variables address that I could display by using
fprintf(stdout, "%p\n", (void*) &var);
and actually place it into another variable, without displaying it.
(Into a String variable, not into it's actual address)
I have tested this with setbuf and everything but it still displays the String which I would not want.
I have tried looking everywhere but all I see is using either setbuf or some other means that doesn't fit what I am looking for.
char *? Have you triedsprintf(mystr, "%p", (void*) &var)? Heremystrwould be a pointer to a character array.