For example we have an Animal class ,and we created some other class such as Lion class,Tiger class,etc. I have made a list of the Animal class and I want to transverse the list and process the list according to the type of the class of the every member in the list.
Class Animal
Class Tiger :: public Animal{}
Class Lion :: public Animal{}
list<Animal> l;
Tiger T;
Lion L;
l.push_back(T); l.push_back(L);
if the top member of the list is Tiger print"ITs a tiger"
else print"something"
Simply, I want to check the type of the instance created. I don't know how to do it.