Quantcast
Viewing latest article 10
Browse Latest Browse All 222

Comment by Peter - Reinstate Monica on How do I create an abstract class inside a parent class so that every children class can have it's own implementation?

Yes, they need to receive the base argument type, and, what's important, probably you want it by reference. Passing the argument by value instead will compile but "slice" the derived argument type into the base argument type. It will be the true base argument type -- all member functions, even those which are overridden in the derived argument, will be of the base argument.

Viewing latest article 10
Browse Latest Browse All 222

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>