   [C++] Overloaded functions with inheritance
  Hey guys,If I have some type B which is derived from type A and I have some functions,void functionA (A*) ;void functionA (B*) ;furthermore, I declare an instance and call a function,B *pObject = new B ;functionA (pObject) ;which overloaded version of functionA () will be invoked since type B can be stored within a pointer to a type A and can also be stored within a pointer to its own type?   
  In C++ that isn't an easy question to answer in the general case. It requires knowing the specifics of where each function is defined. I refer you to Koenig lookup and Guru of the week #30.   ;  Take a look at 13.3 Overload Resolution in the standard.In simplified form:The function which takes a B pointer is an exact match whilst the other function which takes a base requires an implicit conversion. Therefore the function which takes a B is the best match and is called.