要求满足如下要求:有带参构造函数;可设置日期;可运行日期加一天的操作;有输出操作(用日/月/年格式输出日期。
#include <iostream>
#include <iomanip>
using namespace std;
class CDate
{
public:
CDate(int nYear = 0, int nMon = 0, int nDay = 0);
bool SetData(int nYear, int nMon = 0, int nDay = 0);
bool AddDay();
void PrintData();
private:
bool IsTrue();
int m_nYear;
int m_nMonth;
int m_nDay;
};
CDate::CDate(int nYear, int nMon, int nDay)
:m_nYear(nYear),
m_nMonth(nMon),