Question: Given the following two class definitions such that Y is publicly derived from X. class X { public: X(int d) {data = d;} void display()
Given the following two class definitions such that Y is publicly derived from X. class X { public: X(int d) {data = d;} void display() {cout << data << endl;} private: int data; };
Using precise C++ syntax, specify the most appropriate code that should replace the three underlined items:
class Y's heading
call X's 1-parameter constructor
call X's display member function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
