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

📄 date2.cpp

📁 this an OOP file which is very easy to understand. So, it is very suitable for the beginner to read.
💻 CPP
字号:
// Date2.cpp// Implementation file for the Date2 class#include <iostream>    // Library file, so uses <>using namespace std ;#include "Date2.hpp"    // User-defined, so uses ""// constructor of class DateDate2::Date2( int m , int d , int y ){    month = m ;    day   = d ;    year  = y ;}// constructor of class DateDate2::Date2(){}// method: set private variables m, d, and yvoidDate2::set( int m , int d , int y ){    month = m ;    day   = d ;    year  = y ;}// method: display values of private variables m, d, and yvoidDate2::print( Lang l ){    if ( l.isChinese() )    {	cout << year << "." << month << "." << day ;    }    else    {	cout << month << "/" << day << "/" << year ;    }}

⌨️ 快捷键说明

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