⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 client.cpp

📁 This file implements the Date class member functions Date representation: int variable -- year,mon a
💻 CPP
字号:
//******************************************************************
// TestDate program: client.cpp        DesignNo.9_1
// This is a very simple client of the original Date class
// declared in file Date.h
//******************************************************************
#include "Date.h"
#include <iostream>

using namespace std;

void main()
{
  Date d1(2004,12,24);
  Date d2;
  Date d3;
  // test d1
  cout << "The first object d1(2004,12,24) is " << endl;
  d1.GetDate();
  cout << d1.GetYear() << endl;
  cout << d1.GetMonth() << endl;
  cout << d1.GetDay() << endl;
  
  cout << endl;
  // test d2
  cout << "The second object d2 is " << endl;
  d2.GetDate();
  cout << d2.GetYear() << endl;
  cout << d2.GetMonth() << endl;
  cout << d2.GetDay() << endl;

  cout << endl;
  // test d3
  cout << "The third object d3 is " << endl;
  d3.SetDate(2004,12,8);
  d3.GetDate();
  cout << d3.GetYear() << endl;
  cout << d3.GetMonth() << endl;
  cout << d3.GetDay() << endl;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -