J
jacek
I have a:
class A
and a:
class B : public A
then I have a:
vector<A*> v;
which contains objects of both A and B classes.
when doing
for (int i=0; i<v.size(); i++)
{
}
I want to identify if each v is an object of class A or B.
sizeof(A) and sizeof(B) give the same unfortunately.
any hints?
jacek
class A
and a:
class B : public A
then I have a:
vector<A*> v;
which contains objects of both A and B classes.
when doing
for (int i=0; i<v.size(); i++)
{
}
I want to identify if each v is an object of class A or B.
sizeof(A) and sizeof(B) give the same unfortunately.
any hints?
jacek