随笔分类 - C++
摘要:#include #include int MyAtoi(const char* str)
{ if (str == NULL) return 0; int slen = strlen(str); if(slen ='0')&&(*c <= '9')) { t = *c-'0'; ret = ret *10+...
阅读全文
摘要://class Resource {//public:// Resource(parms p): r(allocate(p)) { }// ~Resource() { release(r); }// // also need to define copy and assignmen...
阅读全文
摘要:如果需要使用 INT64_MAX ,在centos 64位下,需要使用g++ 4.7.0 then -std=c++11, -std=c++0x也不行
阅读全文
摘要:最好不要使用"string.h",stdint.h,iostream.h这样的头文件,这些都是C的头文件习惯使用
阅读全文
摘要:// 以下摘自网络静态函数在函数的返回类型前加上关键字static,函数就被定义成为静态函数。函数的定义和声明默认情况下是extern的,但静态函数只是在声明他的文件当中可见,不能被其他文件所用。定义静态函数的好处: 其他文件中可以定义相同名字的函数,不会发生冲突 静态函数不能被其他文件所用。 存储...
阅读全文
摘要:#include #include #ifdef __linux#include #endif// 编译器真是相当友好啊warning C4172: returning address of local// variable or temporary 一定不要返回局部变量啊char* GetMemo...
阅读全文
摘要:http://blog.csdn.net/pongba/archive/2008/06/13/2544894.aspx
阅读全文
摘要:转载于刘未鹏文章http://blog.csdn.net/pongba/archive/2003/10/24/19130.aspx
阅读全文