Question: Supposed we have the following class: class Date { private: int month, day, year; public: Date() {month=1; day=1; year=2000;} Date(int m, int d, int y)
Supposed we have the following class:
class Date { private: int month, day, year; public: Date() {month=1; day=1; year=2000;} Date(int m, int d, int y) { month=m; day=d; year=y;} };
What is wrong with the following function:
Date newdate() { Date d; cout << Please enter the meeting date: ; cin >> d.month >> d.day >> d.year; return d; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
