Define a function that takes a reference to a base-class


Problem

1. Suppose you define a function that takes a reference to a base-class object as an argument. Why can this function also use a derived-class object as an argument?

2. Suppose you define a function that takes a base-class object as an argument (that is, the function passes a base-class object by value). Why can this function also use a derived-class object as an argument?

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Define a function that takes a reference to a base-class
Reference No:- TGS02639310

Expected delivery within 24 Hours