最简单的智能指针就是将指针封装在类里,同时将该类的复制与赋值禁用,也就是使该类失去值语义。实现代码如下: 1 #ifndef SMART_PTR_H 2 #define SMART_PTR_H 3 #include 4 5 6 template 7 class SmartPtr 8 { 9 ...
分类:
编程语言 时间:
2014-10-09 01:07:37
阅读次数:
327
转自: http://blog.csdn.net/lybwwp/article/details/18813737js模板引擎越来越多的得到应用,如今已经出现了几十种js模板引擎,国内各大互联网公司也都开发了自己的js模板引擎(淘宝的kissy template,腾讯的artTemplate,百度的b...
分类:
Web程序 时间:
2014-10-09 01:03:27
阅读次数:
329
1, 后台--》用户--》用户组--》系统用户组--》游客 编辑附件查看权限,可以查看图片。2, 将/bbs/template/default/forum/ 下的discuzcode.htm 内容替换成下文:(注意备份)(该内容为GBK版本 没有安装新浪微博插件:){evalfunction tpl...
分类:
其他好文 时间:
2014-10-09 00:57:57
阅读次数:
518
C++ Standard Template Library STL
分类:
编程语言 时间:
2014-10-09 00:54:27
阅读次数:
380
WHUPhd.cls 1 % !Mode:: "TeX:UTF-8" 2 \NeedsTeXFormat{LaTeX2e}[1999/12/01] 3 \ProvidesClass{WHUPhd}[2013/12/17 3.2 Wuhan University Thesis Template ...
分类:
其他好文 时间:
2014-10-08 12:22:35
阅读次数:
3395
MCM.sty 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 %% latex Template 3 %% The Template is writen by liuyu,I reference t...
分类:
其他好文 时间:
2014-10-08 03:12:14
阅读次数:
642
头文件:
#include
using namespace std;
template
class hash_set
{
private:
hash_type array[100000];
int hash_fun(hash_type original);
public:
hash_set();//构造函数
void insert(hash_type value);//插入一个元素
v...
分类:
编程语言 时间:
2014-10-08 00:36:14
阅读次数:
349
STL内存创建
1. Stl内存创建__malloc_alloc_template
STL的常用的内存创建参考文件: stl_alloc.h,文件中定义了__malloc_alloc_template模板库,创建与释放使用C方法malloc、free、realloc,模板库里面主要对外提供了函数:
allocate: 分配内存
deallocate: 释放内存...
分类:
其他好文 时间:
2014-10-07 09:46:23
阅读次数:
279
前面我们写过类似的Stack:template >class Stack{public: void push(const T &); void pop(); T top() const; bool empty() const;private: Al...
分类:
其他好文 时间:
2014-10-07 01:19:22
阅读次数:
349
在之前,我们写过类似的stack template >
class Stack
{
public: void push(const T &); void pop(); T top() const; bool empty() const;
private: Alloc cont_;
}; 那么我们使用...
分类:
其他好文 时间:
2014-10-06 21:18:20
阅读次数:
291