[gameprogrammer] detecting class type at runtime

  • From: luo_hei@xxxxxxxx
  • To: gameprogrammer@xxxxxxxxxxxxx
  • Date: Wed, 18 Apr 2012 09:09:46 -0400

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


Other related posts: