CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 1999
    Posts
    32

    Getting method name

    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


  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Getting method name

    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




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured