Search⌘ K

Inheritance between Index and Index1 Class

Explore how to create an Index base class with an overloaded increment operator and a derived Index1 class with a decrement operator. Understand access modifiers and function search order in inheritance.

Challenge

Write a program that has an Index class in it that keeps a count and gets incremented when ++ is done on an Index object. Derive from it an Index1 class that provides the overloaded decrementation, --, operator. ...