I need some help to understand everything correctly.

I want to check a pointer to a abstract class if it is instance of a specific child class.

I have one abstract class "kunde" and two child classes "firmenkunde" and "privatkunde" who inherit the methods of kunde. 

In order to search by "int knr" (int customer number) I use as return type a pointer to "kunde". 

Within the database class I get back the "kdstatus" and use 

```
kunde * kd = new privatkunde(0);

```

if the status is PK or new firmenkunde(0) if it would be FK. 
The abstract class kunde doesn't have any attribute I could use to save the status. 

This way I did hope to be able to ask, if the returned pointer would be an instance of the class privatkunde or firmenkunde. But I did not found any method to do this.

```
 MessageBox::Show(marshal_as<String^>(typeid(kd).name())); 

```

I did ask the typeid name but this only returns "class kunde \*" and is not what I want to know.

Is there a way to work around this problem?