C++ templates
p.c.wang
这个作者很懒,什么都没留下…
展开
-
stddef.h
stddef.h定义了一些标准宏以及类型 宏 NULL Null 指针常量 offsetof(type, member-desginator) 获得字段在结构体中的偏移量 类型 ptrdiff_t 带符号的整数类型, 用来表示指针相减的结果类型 typedef int ptrdiff_t wchar_t 宽字符类型原创 2013-08-13 14:07:16 · 979 阅读 · 0 评论 -
模板之函数模板
一:定义模板 eg:template //template 可以用class替换 inline T const& max (T const& a,T const& b ) { return a 二:使用模板 eg:#include #include原创 2013-08-13 20:59:06 · 943 阅读 · 0 评论 -
关于“类型,参数,变量”的声明中,其编程风格
下面几种参数的书写风格:、 void foo(const int &x); void foo(const int& x); void foo(int const &x); void foo(int const& x); 对于“常整数”而言,原创 2013-08-13 14:48:25 · 1032 阅读 · 0 评论