随笔分类 -  C++ STL

摘要:#include using namespace std;class A{public: int a;public: A& operator++(){ cout<<"A& operator++()"<<endl; a=a+1; return *this; } A operator++(int){ cout<<"A... 阅读全文
posted @ 2014-05-05 19:21 sxcww 阅读(1060) 评论(0) 推荐(0)
摘要:《STL源码剖析》学习笔记jjalloc.h#ifndef JJALLOC_H#define JJALLOC_H#include#include #include#include#include namespace JJ{templateinline T* _allocate(ptrdiff_t size,T*){ /*set_new_handler则是一个输入并返回 new_handler类型的函数。set_new_handler的 输入参数是operator new分配内存失败时要调 用的出错处理函数的指针,返回值 是set_new_handler没调用之前... 阅读全文
posted @ 2014-01-15 22:03 sxcww 阅读(728) 评论(0) 推荐(0)