2014年8月6日

20140806--智能指针

摘要: 1.shared_ptr的作用如同指针,但会记录有多少个shared_ptr指向同一个对象。就是引用计数。只有当指向这个对象的最后一个指针被销毁,也就是引用计数变为0的时候,这个对象才会被删除。头文件#include ```cpp#include #include #include #include... 阅读全文

posted @ 2014-08-06 20:48 detectiveh 阅读(85) 评论(0) 推荐(0) 编辑

2014年8月3日

20140802

摘要: 今天没干啥事,就学了下github最简单的用法,能满足我现在的需求了1.git init2.git add *.c3.git commit -m "code information"4.git remote add name https://github.com/git hub username/r... 阅读全文

posted @ 2014-08-03 00:19 detectiveh 阅读(96) 评论(0) 推荐(0) 编辑

2014年8月1日

20140801--function指针(c++11新标准)

摘要: 1.头文件:#include .用c++11的标准编译时要用 $g++ -o filename filename.cpp -std=c++0x2.我们平时用的指针是这样的:```cpp#include #include #include using namespace std;void test(i... 阅读全文

posted @ 2014-08-01 20:48 detectiveh 阅读(148) 评论(0) 推荐(0) 编辑

20140801--异常类

摘要: 1.异常类```cpp#ifndef EXCEPTION_H_#define EXCEPTION_H_ #include #include class Exception : public std::exception{ public: Exception(const char ... 阅读全文

posted @ 2014-08-01 19:12 detectiveh 阅读(132) 评论(0) 推荐(0) 编辑

导航