HackerRank Accessing Inherited Functions in C++ problem solution - TheCScience