随笔分类 -  C++

摘要:#ifndef __STRING__ #define __STRING__ #include<ostream> class String { public: String(const char* cstr = 0); //构造函数 String(const String& str); //拷贝构造 阅读全文
posted @ 2020-12-28 03:10 声声醉如兰 阅读(174) 评论(0) 推荐(0)
摘要:#ifndef __COMPLEX__ #define __COMPLEX__#include<ostream> class complex{public: complex(const double r = 0, const double i = 0) //构造函数,r和i的默认参数为0 :re(r 阅读全文
posted @ 2020-12-22 02:30 声声醉如兰 阅读(147) 评论(0) 推荐(0)
摘要:C++ operator(重载操作符) 阅读全文
posted @ 2017-07-29 22:24 声声醉如兰 阅读(464) 评论(2) 推荐(0)