第三章第十题
来源:互联网 发布:linux 删除history 编辑:程序博客网 时间:2024/05/20 10:23
#include <iostream>using namespace std;class Date;class Time {public: Time(int,int,int); friend void display(const Date &,const Time &); private: int hour; int minute; int sec; }; Time::Time(int h,int m,int s) {hour=h; minute=m; sec=s; }class Date {public:Date(int,int,int); friend void display(const Date &,const Time &); private: int month; int day; int year; };Date::Date(int m,int d,int y) {month=m; day=d; year=y; }void display(const Date &d,const Time &t) { cout<<d.month<<"/"<<d.day<<"/"<<d.year<<endl; cout<<t.hour<<":"<<t.minute<<":"<<t.sec<<endl; }int main(){ Time t1(10,13,56); Date d1(12,25,2004); display(d1,t1); return 0;}
0 0
- 第三章第十题
- 第三章第十题
- 第三章第十题
- 第三章第十题
- 第三章 第十题
- 第三章第十题
- 第三章第十题三角形面积20150418
- 第三章 第十一节 总结
- 【java语言程序设计基础篇第十章第三题】
- 记录——《C Primer Plus (第五版)》第十章编程练习第三题
- 第三章第三题
- 第三章第三题
- 第三章第三题
- 第十章第五题
- 第二章第十题
- 第二章第十题
- 第二章第十题
- 第二章第十题
- border-radius bug 收集
- 第三章第9题
- acm练手 单调递增最长子序列
- ORACLE杀掉没有释放的的sql
- [ACMcoder] Number Sequence
- 第三章第十题
- Mac 下QQ截图不能使用
- webservice简单入门总结
- 3.5
- poj 3090 欧拉函数
- 监听器和过滤器
- screenonclick类
- CC2540软件在线升级
- 提示框效果