C/C++/Java
文章平均质量分 80
zhtwe
希望这里会是一个新的开始...
展开
-
C programs under Linux
1. function with variable argumentsvoid myprintf(const char *format, ...){ va_list arglist; va_start(arglist, format); vprintf(format, arglist); // or some other operation va_end(argli原创 2010-01-27 23:53:00 · 575 阅读 · 0 评论 -
getopt under Linux
#include #include void mygetopt(int argc, char *argv[], const char *optstr){ extern char *optarg; extern int optind, optopt; int ch; printf("/nresult for /"%s/":/n"原创 2010-04-19 20:59:00 · 300 阅读 · 0 评论 -
数组
数组...原创 2010-08-30 21:32:00 · 607 阅读 · 3 评论 -
4 type cast operators in C++
static_cast, const_cast, reinterpret_cast, dynamic_cast原创 2011-01-04 21:57:00 · 666 阅读 · 2 评论 -
C++中的new和delete
C++中的new/delete ...原创 2011-01-05 20:32:00 · 523 阅读 · 0 评论 -
A design & implementation of reflection in C++
C++中反射机制的设计和实现...原创 2011-03-22 00:43:00 · 610 阅读 · 0 评论 -
RTTI in C++
RTTI(Runtime Type Identification/Information) 如果要实现运行时的RTTI,必须在类中加入一些唯一识别信息,静态成员变量则提供了这样一种方法。对于类而言,静态成员的地址信息是唯一确定的,这样就可以设计一种实现RTTI的方法。 1. typeid and dynamic_cast标准C++中定义了type_info这个类用来表示对象原创 2010-12-20 20:12:00 · 473 阅读 · 0 评论