date2.cpp

来自「this an OOP file which is very easy to u」· C++ 代码 · 共 46 行

CPP
46
字号
// 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 + =
减小字号Ctrl + -
显示快捷键?