I have three classes inherited from same parent class. and i have function that takes parent type(typical polymorphism) as parameter. How do i distinguish the true type of the object? Thanks
class Parent{}
class A : public Parent{}
class B : public Parent{}
class C : public Parent{}
void test(Parent &input){
/*
how do i know the object is A, B or C?
I want to perform some operations on the input
but it's different depends on input's true type.
*/
}