//avl_tree.h
#include
using std::stack;
template
class AVL_TREE
{
public:
AVL_TREE(){
nil = new AVL_NODE(0, -1, NULL, NULL);
tree_root = nil;
}
bool find(const T &val) const;
void insert(co...
分类:
其他好文 时间:
2014-09-16 23:44:51
阅读次数:
272
模板模式特点:提取相同的特性放在基类中,而将不同的特性作为一个借口抽象出来,放到派生类中进行具体实现。Template.h内容 1 #ifndef Template_H_H 2 #define Template_H_H 3 4 #include 5 #include 6 using names...
分类:
其他好文 时间:
2014-09-16 20:34:51
阅读次数:
203
is_heap原型:
std::is_heap
default (1)
template
bool is_heap (RandomAccessIterator first, RandomAccessIterator last);
custom (2)
template
bool is_heap (RandomAccessI...
分类:
其他好文 时间:
2014-09-16 17:31:24
阅读次数:
202
includes原型:
std::includes
template
bool includes ( InputIterator1 first1, InputIterator1 last1,
InputIterator2 first2, InputIterator2 last2 );
template
bool includes (...
分类:
其他好文 时间:
2014-09-16 16:03:50
阅读次数:
199
inplace_merge原型:
std::inplace_merge
default (1)
template
void inplace_merge (BidirectionalIterator first, BidirectionalIterator middle,
BidirectionalIterato...
分类:
其他好文 时间:
2014-09-16 16:02:20
阅读次数:
170
面向对象编程和泛型编程都能处理在编写程序时不知道类型的情况。不同之处:OOP能处理类型在程序运行之前都未知的情况;而泛型编程中,在编译时就能获知类型了
模板参数类别不能为空。
模板参数表示在类或函数定义中用到的类型或值。
template
int compare(const T &v1 , const T &v2)
{
if(v1
if(v2
return...
分类:
编程语言 时间:
2014-09-16 14:21:43
阅读次数:
382
最近在update我的一个github项目的时候,想要把原来单一进程的模式改成多进程的模式。事情是这样的,我做了一个HTTP服务器,支持动态脚本。在完成了一大堆各种各样的特性后,遇到了一个脚本超时的问题。在我的HTTP服务器中,将页面分成了Template和Activity两个部分,一个是用..
◆useradd1.作用useradd命令用来建立用户帐号和创建用户的起始目录,使用权限是超级用户。2.格式useradd [-d home] [-s shell] [-c comment] [-m [-k template]] [-f inactive] [-e expire ] [-p pass...
分类:
其他好文 时间:
2014-09-16 12:27:00
阅读次数:
150
http://blog.csdn.net/shahdza/article/details/6317011 该帖的改进版本无返回值,非负整数输入template inline void input(T &ret){ char c; ret=0; while(c=getchar(),c'9'...
分类:
其他好文 时间:
2014-09-16 10:40:30
阅读次数:
237
《Accelerated C++》 笔记 书籍ISBN:978-7-111-22404-4 Chapter 8
P123 typename关键字 这里举了一个这样的例子: template T median (vector v){
typedef typename vector::size_type...
分类:
编程语言 时间:
2014-09-15 22:35:29
阅读次数:
611