If a class x needs to be derived from a class y, which of the following ways is correct to do so?
Options
- class x : public y
- class y : public x
- class x derives public y
- class y derives public x
CORRECT ANSWER : class x : public y
Write your comments