How to call child class function having only parent class object

In reply to cuonghle:

Thanks for the answer.
I think my example is not good one because of that you got confused.

So we have a VIP from vendor, in that VIP there is a predefined callbacks with their methods.
When some event happens in the system, than that callback triggers a function. That function proto is following:

 virtual function void CompletionQueueEnterCbF (vendorTrans trans);

now vendorTrans is coming together with the VIP, but I want to change that to myTrans type.
I cannot edit the CompletionQueueEnterCbF function definition as it is VIP files.

I tried to mimic this scenario using the example. In that example assume that

function monitorTraffic( trans t1);

is vendor function