04 2015 档案

C++ Primer:第七章:类
摘要:定义一个类:class Myclass{ int data_i; string data_str;public: int getdata_i() const { return data_i; } string getdata_str() const {return data_str; }}; /... 阅读全文
posted @ 2015-04-26 00:33 街角的咖啡店 阅读(195) 评论(0) 推荐(0)
《C标准库》—之<assert.h>实现
摘要:首先,贴出标准库中的实现源码:#undef assert#ifdef NDEBUG#define assert(test)((void)0)#elsevoid _Assert(char*);#define _STR(x) _VAL(x)#define _VAL(x) #x#define asser... 阅读全文
posted @ 2015-04-25 01:08 街角的咖啡店 阅读(304) 评论(0) 推荐(0)