运算
来源:互联网 发布:红米note2手机壳淘宝 编辑:程序博客网 时间:2024/06/08 16:38
//// Created by moon on 9/7/17.//#include <iostream>using namespace std;class Date{private: int Day,Month,Year;public: Date(int InputDay,int InputMonth,int InputYear):Day(InputDay),Month(InputMonth),Year(InputYear){}; //返回值,+完之后会得到值。&,证明是返回本身。 Date& operator +(int DaysToAdd){ Day+=DaysToAdd; return *this; } void DisplayDate(){ cout<<Day<<"/"<<Month<<"/"<<Year<<endl; }};int main(){ Date Holiday(25,12,2011); Holiday.DisplayDate(); Date fuck(Holiday); Date sex = Holiday+7; sex.DisplayDate();}
阅读全文
0 0
- “<<”运算“+ - * /”
- && || 运算
- 运算
- 运算
- 运算^
- 运算
- 运算
- &运算
- 运算
- 运算
- 前置运算 后置运算
- 二进制运算 移位运算
- 图像运算--代数运算
- 位运算【基本运算】
- 算术运算、关系运算
- &运算和|运算
- Sizeof运算、位运算
- 或运算,且运算
- Mark 一些有意思的深度学习方向
- bzoj3505 [Cqoi2014]数三角形
- HDU1048 凯撒加密
- Permissions on the password database may be too restrictive.
- bzoj4300 绝世好题
- 运算
- #ZCH快捷键
- Win7(64位)系统下Python3.6.0(Anaconda3-4.4.0)+Tensorflow的安装与配置
- 设计模式总结一
- http请求的方法
- 链表
- nl命令---Linux
- PHP中双冒号::的用法及意义
- 安卓导入依赖包失败 Failed to resolve: ×××