摘要: 结果: 构造B(5) 析构B(5) 析构形参t1 析构t2 析构t1 阅读全文
posted @ 2016-08-29 13:53 绿水白川 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 结点: 阅读全文
posted @ 2016-08-29 13:37 绿水白川 阅读(155) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; void Order(vector &data){ int count = data.size(); int tag = false; for(int i = 0; i data[j+1]){ tag = true; int... 阅读全文
posted @ 2016-08-29 11:55 绿水白川 阅读(665) 评论(0) 推荐(0) 编辑
摘要: 调用_onexit(func)函数可以在main之后执行func()。 阅读全文
posted @ 2016-08-29 11:45 绿水白川 阅读(144) 评论(0) 推荐(0) 编辑
摘要: // __FILE__与__LINE__是系统预定义宏,由编译器定义的 cout << __FILE__; cout << __LINE__; 阅读全文
posted @ 2016-08-29 11:43 绿水白川 阅读(448) 评论(0) 推荐(0) 编辑
摘要: 重载: ⑴同一个类中 ⑵函数名相同 ⑶参数不同 ⑷virtual关键字可有可无 覆盖: ⑴分别位于派生类与基类中 ⑵函数名字相同 ⑶参数相同 ⑷基类函数必须有virtual关键字 隐藏: ⑴如果派生类的函数与基类的函数同名,但参数不同,无论有无virtual关键字,基类的函数将被隐藏 ⑵如果派生类的 阅读全文
posted @ 2016-08-29 11:40 绿水白川 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 修改内容的差别: char a[] = "hello"; a[0] = 'x'; char *p = "world"; //指向常量字符串 p[0] = 'x'; //编译无错,运行出错 sizeof运算符能计算数组容量,而sizeof(pointer)得到的是指针变量的字节数而非pointer所指 阅读全文
posted @ 2016-08-29 11:24 绿水白川 阅读(123) 评论(0) 推荐(0) 编辑
摘要: //bool if(!a) if(a) //int if(a == 0) //float const EXP = 0.000001; if(a -EXP) //pointer if(a != NULL) if(a == NULL) 阅读全文
posted @ 2016-08-29 11:14 绿水白川 阅读(969) 评论(0) 推荐(0) 编辑
摘要: 如下表示合法: 阅读全文
posted @ 2016-08-29 11:10 绿水白川 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 通用寄存器给出的地址是段内偏移地址,相应的段寄存器地址*10H+通用寄存器内地址,便是实际访问地址。 阅读全文
posted @ 2016-08-29 11:02 绿水白川 阅读(1418) 评论(0) 推荐(0) 编辑