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

matlab - How to equate a structure array to structure array -

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -