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

📄 usedate.cpp

📁 Since the field of object oriented programming is probably new to you, you will find that there is a
💻 CPP
字号:
                              // Chapter 5 - Program 12 - USEDATE.CPP
// This is a very limited test of the date class

#include <iostream.h>
#include "date.h"

int main(void)
{
date today, birthday;

   birthday.set_date(7, 21, 1960);
   cout << "Limited test of the date class\n";
   cout << "Today is " << today.get_date_string() << "\n";
   cout << "Birthday is " << birthday.get_date_string() << "\n";

   today.set_date_format(4);
   cout << "Today is " << today.get_date_string() << "\n";
   cout << "Birthday is " << birthday.get_date_string() << "\n";

   return 0;
}


// Result of execution

// Limited test of the date class
// Today is May 15, 1994
// Birthday is Jul 21, 1960
// Today is 15 May 1994
// Birthday is 21 Jul 1960

⌨️ 快捷键说明

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