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

Java sticky instances of class com.mysql.jdbc.Field aggregating -