Hi,

Im originally a java programmer and am only new to C++.

I have create a simple base class and two sub-classes.

class Base
{
public:
Base();
};

class Child1 : public Base
{
public:
Child1();
};

class Child2 : public Base
{
public:
Child2();
};

In a main program I instantiate an object as follows
Base* base_p = new Child1();

Is there a way of checking whether that variable is an instance of Base or an instance of Child1

In java you can use instanceof, is there a similar keyword in C++?

Thanks...