C++

Asked • 08/22/19

How to call a parent class function from derived class function?

How do I call the parent function from a derived class using C++? For example, I have a class called `parent`, and a class called `child` which is derived from parent. Within each class there is a `print` function. In the definition of the child's print function I would like to make a call to the parents print function. How would I go about doing this?

1 Expert Answer

By:

Matthew P. answered • 08/23/19

Tutor
New to Wyzant

I'm Matt and I love to teach math, science, programming & guitar

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.