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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!