When class D is derived from class B and both class have same function names but with different signatures (arguments)
then this kind of inheritance design is not call 'function overridding / over loading' ... !! which i believe you are trying to achieve .. instead this concept is called 'function hiding'..
So when you are intended to call g('a') it does not call g() in B class .. rather the function in D class gets executed with 'char' get casted to 'int' type, and since g() has become a recursive function hence the control keep jumping to g(int) in D class.
when you uncomment the 17th and 18th line , the keyword 'using' explicitly define base methods in derived..
another way to do this is write __super::method_name() in derived class instead of using as many compilers does not support 'using'.
__super is define in STL.