05 2012 档案
摘要://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
阅读全文
摘要:from :http://www.vckbase.com/document/viewdoc/?id=1468 原著:Radu Privantu 翻译:pAnic 2005年5月11日 原文出处:A Beginner’’s Guide to Creating a MMORPG ------------------------------------------------------------------- 译者序:这是一篇讲解如何开发一款MMORPG的入门文章,作者本人也是一款游戏的开发者,文中的内容源于实践,有很高的参考价值。很多人都想拥有自己 的游戏,这篇文章对...
阅读全文
摘要: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_
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文