Click to See Complete Forum and Search --> : Getting method name


abbomar
March 12th, 2002, 03:28 PM
Hi. I would like to generically get the name of the method I am in during run time. Is there a macro (similar to __FILE__) out there that will do that? Or is there some other way to do this?

I know that I can just set up a text string in each method and use that. I would like to not have to do that.

Thanks.

mark

Paul McKenzie
March 12th, 2002, 04:16 PM
Depends on the compiler. Many compilers have the __FUNC__ macro. VC++ 6.0 doesn't have this, while most other compilers do. This happens to be one thing that VC++ dropped the ball on.

Regards,

Paul McKenzie