How do I find out, which type of class the variable is, I catually have.

Let me give you an example how I mean this:

Code:
CRectangle* rectangle =  new CRectangle();
if (   isClassType(CRectangle, rectangle)    )
{
          print("the variable rectangle is a CRectangle class");
}
The function I search has another name and other variables, but it finds out, what kind of class the variable (or pointer) is.

I know there is a function like the isClassType() in MFC, but I don`t find it.
Please help.