J
josh
Hi I noticed that when I make a function with a base class parameter
that is a reference
than at run-time the compiler calls a base class function also if I
have passed a derived object.
But if I make that function with a pointer to a base class and then I
pass the derived class
at run-time the compiler calls a derived class function thanks to
dynamic binding.
Now why this difference if a reference is like a pointer and it
contains also an address of????
Thanks!
How is hard to learn C++ ........................
that is a reference
than at run-time the compiler calls a base class function also if I
have passed a derived object.
But if I make that function with a pointer to a base class and then I
pass the derived class
at run-time the compiler calls a derived class function thanks to
dynamic binding.
Now why this difference if a reference is like a pointer and it
contains also an address of????
Thanks!
How is hard to learn C++ ........................