Results 1 to 2 of 2

Thread: [RESOLVED] Identifying Types

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member GamerMax5's Avatar
    Join Date
    Nov 2004
    Location
    United States
    Posts
    388

    Resolved [RESOLVED] Identifying Types

    I think I remember reading somewhere how to do this but I can't remember how to for the life of me now that I need to do it. Figures huh?

    I have a method that uses generics for a parameter. It's purpose is to output necessary information about an object to either the console (debugging) or to the window as needed. However I need to be able to identify the base type of the incoming parameter inside the method and I can't remember how to do that.

    Here's a skeleton of the method:

    Code:
    template <typename T>
    void displayObjectInfoConsole(T inObject) {
    }
    Is this something I can use RTTI for or am I thinking in the wrong direction?
    Last edited by GamerMax5; Dec 19th, 2008 at 07:16 PM.

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