Roger Luo

超越梦想一起飞
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年3月18日

摘要: class ComplexA{public: ComplexA(int len):_l(len), _p(new char[_l]){cout<<"ComplexA::ComplexA"<<endl;} ~ComplexA(){cout<<"ComplexA::~ComplexA"<<endl; if (_p != nullptr) delete _p;}private: ... 阅读全文

posted @ 2013-03-18 21:01 Roger Luo 阅读(1431) 评论(1) 推荐(0) 编辑

摘要: Q:构造函数中涉及的大量内存分配以及复杂对象变量的初始化失败应该如何处理 应该放在initialize list里面 ClassA():objb(new ClassB) 这样如果失败了一些构造好的对象也会自动析构掉 有些方法: ClassA::ClassA(){ objb = new ClassB(); if(objb == NULL) { ... 阅读全文

posted @ 2013-03-18 13:38 Roger Luo 阅读(299) 评论(0) 推荐(0) 编辑

摘要: In Boost library, there are totally three libraries to support regex parser, regex, xpressive and .. the xpressive library is static compile, that means it will cause a lot of time to build your proj... 阅读全文

posted @ 2013-03-18 10:26 Roger Luo 阅读(293) 评论(0) 推荐(0) 编辑