C++, right ? here it is if i still remember class A { ... virtual char getClass(){ return 'A'; } } class B: public A { virtual char getClass(){ return 'B'; } } class C: public A { virtual char getClass(){ return 'C'; } } void dosomething(A *variable){ switch(variable->getCalss()) case ... } 2012/4/18 <luo_hei@xxxxxxxx> > I have the following: > > class A { ... } > class B: public A {} > class C: public A {} > > void dosomething(A *variable){ > > } > > inside dosomething I need to know if variable is of type B or C at > runtime, is there some portable way to do this? > > > -- > Roger D. Vargas > Using Gentoo Linux 2010 > La unica forma de encontrar los limites de lo posible es yendo mas > alla de ellos, hacia lo imposible > > --------------------- > To unsubscribe go to > http://gameprogrammer.com/**mailinglist.html<http://gameprogrammer.com/mailinglist.html> > > >