上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 34 下一页
摘要: FAQ:Transmission Uses All the Free MemoryInactive MemoryDescription Some Mac OS X users have reported that when they run Transmission, their system's Activity Monitor shows their Free memory keeps shrinking and their Inactive Memory keeps growing. This is sometimes mistaken as a memory leak, bu. 阅读全文
posted @ 2012-06-06 20:50 邓维 阅读(603) 评论(0) 推荐(0) 编辑
摘要: //from :http://blog.chinaunix.net/uid-24977843-id-376653.html//changed a little bit #include<iostream>#include<pthread.h>usingnamespacestd;//提示出租车到达的条件变量pthread_cond_ttaxiCond;//同步锁pthread_mutex_ttraveler_Mutex;pthread_mutex_ttaxi_Mutex;intsum=0;//记数变量,来确定有人要坐车//旅客到达等待出租车void*traveler_ar 阅读全文
posted @ 2012-05-11 09:17 邓维 阅读(372) 评论(0) 推荐(0) 编辑
摘要: from :http://www.vckbase.com/document/viewdoc/?id=1468 原著:Radu Privantu 翻译:pAnic 2005年5月11日 原文出处:A Beginner’’s Guide to Creating a MMORPG ------------------------------------------------------------------- 译者序:这是一篇讲解如何开发一款MMORPG的入门文章,作者本人也是一款游戏的开发者,文中的内容源于实践,有很高的参考价值。很多人都想拥有自己 的游戏,这篇文章对... 阅读全文
posted @ 2012-05-10 20:24 邓维 阅读(703) 评论(0) 推荐(0) 编辑
摘要: feature : binary tree//example code#include<map>#include<iostream>#include<string>usingnamespacestd;typedefmap<int,string>MAP_INT_STR;typedefMAP_INT_STR::iteratorMAP_ITERATOR;typedefMAP_INT_STR::const_iteratorMAP_CONST_ITERATOR;typedefMAP_INT_STR::reverse_iteratorMAP_REVERSE_ 阅读全文
posted @ 2012-05-10 20:08 邓维 阅读(176) 评论(0) 推荐(0) 编辑
摘要: set is a container that NOT allow same element, while multiset allows .feature : binary tree .here example of contains almost all functions:#include<set>#include<iostream>usingnamespacestd;//displayinordervoiddisplay_all(constmultiset<int>&li){multiset<int>::const_iterato 阅读全文
posted @ 2012-05-10 15:37 邓维 阅读(181) 评论(0) 推荐(0) 编辑
摘要: feature: double linked listexample code of almost all functions#include<list>#include<iostream>usingnamespacestd;//displayinordervoiddisplay_all(constlist<int>&li){list<int>::const_iteratoriter;for(iter=li.begin();iter!=li.end();iter++)cout<<*iter<<",&quo 阅读全文
posted @ 2012-05-10 11:55 邓维 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 1char*strchr(constchar*s,intc){constcharch=c;for(;*s!=ch;++s)if(*s!='\0')return(NULL);return((char*)s);}2char*strrchr(constchar*s,intc){constcharch=c;constchar*sc;for(sc=NULL;;++s){if(*s==ch)sc=s;if(*s=='\0')return((char*)sc);}}3 char *strstr(const char *s1, const char *s2){if(*s2==& 阅读全文
posted @ 2012-03-17 23:33 邓维 阅读(210) 评论(0) 推荐(0) 编辑
摘要: VS : Error Message in DebugMode:Heap Corruption DectectedAfter Normal block (#81) at 0x003f74c0 CRT detected that the application wrote to memory after end of heap bufferwhich is not appeare in Release Mode ( it terminate itself sliently)This is a typical memory leak:Reason of my situation:inttotal_ 阅读全文
posted @ 2012-03-15 21:17 邓维 阅读(865) 评论(0) 推荐(0) 编辑
摘要: chargreeting[]=“Hello”;char*p=greeting;//non-constpointer,non-constdataconstchar*p=greeting;//non-constpointer,constdata;char*constp=greeting;//constpointer,non-constdata;constchar*constp=greeting;//constpointer,constdata;这是书中的解释。const char *p 平时用的最多,自然不需特殊记忆。---指向的内容为常量,内容不可以改变。char * const p 则相反,p 阅读全文
posted @ 2012-03-09 23:22 邓维 阅读(389) 评论(1) 推荐(0) 编辑
摘要: 线程结束,缺少pthread_join 的话,资源并不会真正释放,设置线程 分离属性 ,则可不需要join 都可以释放资源。实例:#include<unistd.h>#include<stdio.h>#include<stdlib.h>#include<string.h>#include<pthread.h>pthread_tpid_new_job; CourseInfoNextCourseInfo;#defineID_SIZE48+1structCourseInfo{charID[ID_SIZE];intLast_Percent;C 阅读全文
posted @ 2012-02-23 00:33 邓维 阅读(1812) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 34 下一页