c++ - How can I get my custom function execution address when coding? -
simple code, eg:
void* print_my_address() { printf("%p\n", .../* execution address of print_my_address */) }
thanks!
ps: gcc v4.7 can address compiler?
the same way you'd other regular variable:
void print_my_address() { printf("%p\n", &print_my_address); }
Comments
Post a Comment