c++ 7.11
来源:互联网 发布:cs结构的java开发 编辑:程序博客网 时间:2024/05/22 15:19
#include<iostream.h>class Date{public:Date(){}Date(int y,int m,int d){month=m; day=d; year=y;} void print() {cout<<year<<"."<<month<<"."<<day<<endl; } friend Date operator +(Date &op);private:int month,day,year;};Date operator+(Date &op){++op.day; return op;}int main(){Date d1(2014,5,17);cout<<"改变日期前:";d1.print();cout<<"天数加1后:";operator +(d1);d1.print();return 0;}
0 0
- c
- c
- c
- c
- C
- c
- c
- c
- C+
- c
- C
- c
- c
- c
- C
- C
- c
- C
- Java装饰模式(Decorator模式)
- 第十一周项目五 点类派生直线类
- C#基础知识——02
- 第11周 代码填充-是春哥啊
- 程序在 编译期,链接期, 运行期各执行哪些操作?
- c++ 7.11
- Gleasy首席架构师薛珂:以开源为基础实现分布式框架及中间件
- 各语言中sql语句的写法(PostgreSQL)
- 模拟海量OpenVPN/IPSec终端进行VPN隧道容量测试
- 一步一步跟我学习lucene(10)---lucene搜索之联想词提示之suggest原理和应用
- 基于Office Web Apps Server 2013 的文档在线预览汇总
- 高精度大数运算模板
- linux usb驱动,一个简单的usb驱动,simp_usb
- 2D物理引擎--开坑篇