Calling a Base class method from Child class c++
问题 i have 4 classes Product and MultiBuyProduct (which is a child of product) which are used to work out price, and a shopping cart which you can add to which calls functions from MultiBuyProduct gets their price and prints a receipt to console, and Amount which is a class that takes 2 ints and does some calculations on them eg add subtract and then returns a formatted price. from my main.cpp i call MultiBuyProduct p2("Wine", Amount(10,0), 2, 10); ShoppingCart SC; SC.add(&p2 ,2, true); below