摘要: //这篇代码比较长建议粘贴下来到dev里面用左边的+-把部分函数收起来一条条的打开看 不容易乱 #include <iostream> using namespace std; class Date{ private: int year,month,day;//年月日 bool IsLeapYear 阅读全文
posted @ 2018-11-08 23:51 刘生伟 阅读(4) 评论(0) 推荐(0) 编辑
摘要: // A code block #include “iostream” using namespace std; class Date { private: int year,month,day; public: Date(int a=0,int b=0,int c=0) { this->year= 阅读全文
posted @ 2018-11-08 23:28 刘生伟 阅读(6) 评论(0) 推荐(0) 编辑
摘要: #include “iostream” using namespace std; class Date { private: int year,month,day; public: Date(int a=0,int b=0,int c=0) { this->year=a; this->month=b 阅读全文
posted @ 2018-11-08 23:01 刘生伟 阅读(1) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; class Time { private: int hour; int minute; int second; public: Time(int a=0,int b=0,int c=0) { this->hour=a; this->minu 阅读全文
posted @ 2018-11-08 22:55 刘生伟 阅读(3) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; class Time { private: int hour; int minute; int second; public: Time(int a=0,int b=0,int c=0) { this->hour=a; this->minu 阅读全文
posted @ 2018-11-08 22:43 刘生伟 阅读(7) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; class complex //复数类声明 { private: double sb;//实数部 double xb;//虚数部 public: complex(double r=0,double i=0)//直接赋值可以多用于有参和无参的 阅读全文
posted @ 2018-11-08 22:28 刘生伟 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 重载运算符号 // A code block #include"iostream" using namespace std; class complex{//复数类声明 private : double shi,xu; public : complex(double s1=0.0,double x1 阅读全文
posted @ 2018-11-08 22:23 刘生伟 阅读(3) 评论(0) 推荐(0) 编辑