3.24
来源:互联网 发布:驳程序员青春 编辑:程序博客网 时间:2024/05/21 11:30
#include<iostream>using namespace std;class date{private:int year;int month;int day;public:int get_year(){return year;}int get_month(){return month;}int get_day(){return day;}void show(){cout<<"the year is:"<<get_year()<<endl;cout<<"the month is:"<<get_month()<<endl;cout<<"the day is:"<<get_day()<<endl;}date(int y,int m,int d);date(const date &d);date(){year=1994;month=02;day=19;}};date::date(int y,int m,int d){year=y;month=m;day=d;}date::date(const date &d){year=2*d.year;month=2*d.month;day=2*d.day;}int main(){date d1(2010,6,8),d2;cout<<"日期d1:"<<endl;d1.show(); cout<<"日期d2:"<<endl;d2.show(); date d3(d1);cout<<"日期d3:"<<endl;d3.show();return 0;}
0 0
- 3.24
- 3.24
- 3.24
- 3.24
- 3.24
- 3.24
- 3.24
- 【3.24】
- 3.24
- 3.24
- 3.24
- 3.24
- 3.24
- 3.24
- 3.24
- 3.24
- 3.24
- 3.24
- 125.按规定删除字符
- 让我们一起Go(二)
- 对程序员说点实在话
- ORACLE_HOME与协议适配器不可加载
- mybatis存储null到oracle报错问题
- 3.24
- 让我们一起Go(三)
- 查看并修改Oracle用户的密码(适用于10g,9i)
- 为什么String要设计成不可变的?
- eclipse的安装配置
- Leetcode|Maximum Gap
- v$session 的SERIAL# 是什么?
- 查看并修改Oracle用户的密码(适用于11g)
- 二叉树的子结构的判定