欢迎访问我的独立博客
摘要: 最有价值的!最有用的引用计数型智能指针,可以被拷贝和赋值,可以作为STL容器的元素;1,基本用法:#include <boost/smart_ptr.hpp>#include <assert.h>using namespace boost;int main(){ shared_ptr<int> sp(new int(10)); assert(sp.unique()); shared_ptr<int> sp2 = sp; assert(sp == sp2 && sp.use_count() == 2); *sp2 = 100; as 阅读全文
posted @ 2012-11-08 17:03 github.com/starRTC 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 1,libc(Linux下的ANSI C的函数库)char * strcat(char * dest, const char * src){ char *tmp = dest; while (*dest) dest++; while ((*dest++ = *src++) != '\0') ; return tmp;}2,微软char* strcat ( char * dst , const char * src ){char * cp = dst;while( *cp )cp+... 阅读全文
posted @ 2012-11-08 08:23 github.com/starRTC 阅读(5111) 评论(3) 推荐(1) 编辑