上一页 1 ··· 7 8 9 10 11 12 13 下一页
摘要: 两种场合:1. 父类指针转换为子类指针转换失败返回空;成功返回子类指针2. 父类引用转换为子类失败抛出bad_cast异常; 成功返回子类的引用#include using namespace std; class CBasic { public: virtual int test(... 阅读全文
posted @ 2014-07-18 08:46 renhl 阅读(225) 评论(0) 推荐(0) 编辑
摘要: thrift使用小记:http://blog.chinaunix.net/uid-20357359-id-2876170.html 阅读全文
posted @ 2013-12-19 08:43 renhl 阅读(135) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/zhuyp1015/archive/2012/07/14/2591869.htmlhttp://www.cnblogs.com/serendipity/archive/2011/08/01/2124118.html 阅读全文
posted @ 2013-10-02 11:05 renhl 阅读(92) 评论(0) 推荐(0) 编辑
摘要: http://www.cppblog.com/colys/archive/2009/08/18/25785.htmlhttp://blog.csdn.net/sunyonggao/article/details/1598790http://www.cnblogs.com/qswang/archive/2012/07/06/2579816.html 阅读全文
posted @ 2013-09-27 08:26 renhl 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 1 // CmpTest.cpp : Defines the entry point for the console application. 2 // 3 4 #include "stdafx.h" 5 6 #include 7 template 8 bool MySort(T* psArray, int i4Num, CMP_FUN CmpFun); 9 10 typedef struct __MYTEST__11 {12 int a;13 int b;14 } S_MYTEST;15 16 //a>b 从小到大17 bool Cmp2(S_MYTEST & 阅读全文
posted @ 2013-09-26 23:55 renhl 阅读(244) 评论(0) 推荐(0) 编辑
摘要: http://wenku.baidu.com/view/78e0de8d84868762caaed59a.html 阅读全文
posted @ 2013-09-24 23:17 renhl 阅读(123) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include //#define DEBUGvoid parseControlExtension(FILE *fp){if(fgetc(fp) != 4){printf("错误的块大小在偏移 %u 处.\n",ftell(fp) -1);assert(0);}size_t buffer[8] = {0};fread(buffer,1,1,fp);printf("下一个图像块使用的处置方式为:%u.\n",(1+2+4)&(*(char*)buffer >> 2));printf 阅读全文
posted @ 2013-09-24 08:55 renhl 阅读(854) 评论(0) 推荐(0) 编辑
摘要: png:http://book.51cto.com/art/200903/112725.htmbmp:http://book.51cto.com/art/200903/112712.htmjpg:http://wenku.baidu.com/view/bb08bad376eeaeaad1f330f0.htmlgif:http://www.cnblogs.com/thinhunan/archive/2006/04/12/372942.html 阅读全文
posted @ 2013-09-24 08:38 renhl 阅读(147) 评论(0) 推荐(0) 编辑
摘要: ■ API // 获取将backstrace信息,将地址存到buffer中。 // 参数size指定buffer的最大值,返回值则是backstrace的实际大小 int backtrace(void **buffer, int size) // 根据buffer指定的地址,返回符号信息。参数size指定返回符号信息的大小 char ** backtrace_symbols(void *const *buffer, int size) // 类似backtrace_symbols()函数,但是不需要malloc空间来存放符号信息, // 而是将结果写到文件描述符fd所代表的文件... 阅读全文
posted @ 2013-09-08 11:03 renhl 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 介绍: The GNU C Library lets you modify the behavior ofmalloc,realloc, andfreeby specifying appropriate hook functions.使用: http://www.gnu.org/software/libc/manual/html_node/Hooks-for-Malloc.html 参考: http://soft.zdnet.com.cn/software_zone/2009/1221/1567788.shtml例子: 代码 1 #include 2 3 /* Prototypes ... 阅读全文
posted @ 2013-09-06 08:43 renhl 阅读(739) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 下一页