
C++基础知识
ruihuank
这个作者很懒,什么都没留下…
展开
-
类中的复制构造和赋值操作
#include <iostream>#include <algorithm>class MyStr {public: MyStr(const MyStr&); MyStr& operator = (const MyStr&);private: char *pdata;};MyStr::MyStr(const...原创 2018-04-12 16:57:15 · 257 阅读 · 0 评论 -
带有引用计数的智能指针
来自《高质量程序设计指南 C/C++》template&lt;class T&gt;class INonintrusiveRefcountManager {public: virtual size_t addRef() = 0; virtual size_t release() = 0; virtual T* realObject() = 0; virt...原创 2018-04-24 11:39:24 · 312 阅读 · 0 评论 -
BigInt
参考 http://www.cnblogs.com/studynote/p/3445398.html#include <iostream>#include <time.h>using namespace std;class BigInt {public: //BigInt(); BigInt(const char*); BigIn...原创 2018-04-20 17:00:10 · 1148 阅读 · 0 评论 -
split 的实现
stackoverflow: https://stackoverflow.com/questions/236129/the-most-elegant-way-to-iterate-the-words-of-a-string/237280#237280笔试可以用,无法自定义分割#include <iostream>#include <string>#includ...转载 2018-08-26 15:11:04 · 686 阅读 · 0 评论