3.24
来源:互联网 发布:分水岭算法基本原理 编辑:程序博客网 时间:2024/06/01 10:14
#include<iostream>using namespace std;class Date{ int year; int month; int day;public:void printDate(){cout<<"日期是:"<<year<<"年"<<month<<"月"<<day<<"日"<<endl;}void GetYear(){cout<<"年份是"<<'\t'<<year<<endl;}void GetMonth(){cout<<"月份是"<<'\t'<<month<<endl;}void GetDay(){cout<<"号数是"<<'\t'<<day<<endl;}void SetDate(int Y,int m,int d){year=Y;month=m;day=d;}}; int main(){Date d1;d1.SetDate(2010,6,8);d1.printDate();d1.GetYear();d1.GetMonth();d1.GetDay();Date d2;d2.SetDate(2015,4,22);d2.printDate();d2.GetYear();d2.GetMonth();d2.GetDay();Date d3(d1);d3.printDate();d3.GetYear();d3.GetMonth();d3.GetDay();system("pause");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
- Android NDK HelloWorld配置(Eclipse)
- 《重构》(笔记二)
- window 下完全卸载Cygwin最简单方法
- c语言条件编译详解
- 无名管道通讯编程
- 3.24
- ZOJ Problem Set - 3600||Taxi Fare
- ZOJ 3605 Find the Marble(dp啊 三维)
- C语言条件编译详解
- 在创建EditView碰到的问题
- 分享2D Unity游戏的动画制作经验
- leetcode_question_84 Largest Rectangle in Histogram
- Nginx实战基础篇一 源码包编译安装部署web服务器
- javaScript中的 if(123) | return | arguments对象