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

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -