所属分类:
书籍源码
开发工具:C++
文件大小:317KB
下载次数:4
上传日期:2006-12-08 13:13:02
说明: C++ Primer 第三版 学习辅导
类的创建、继承、虚函数的使用
bugzhao@sohu.com
原书第23~40页
可以将断点设置在return 0处,然后按F5,
并记录下所有整型数组类ia指针的值,比如:
0x00491f90
0x00491f50
0x00490120
0x00491da0
0x00491d50
然后当调试指针停在return 0处时单步执行,
跟踪每一次析构函数,可以发现后创建的对象最先被消除。
当ia2使用了越界下标时,可以发现执行其析构函数时将报错。
如果ia2也使用越界下标,则会弹出assert信息从而中止。
(third edition of the training and guidance of the founders category, inheritance, The use of virtual function bugzhao@sohu.com original paragraph 23 ~ 40 breakpoint can be set up in r eturn 0, then press F5, and record all types of cosmetic ia array of indicators, for instance : 0x00491f90 0x00491f50 0x00490120 0x00491da0 0x00491d50 then stopped when debugging targets in return 0 when the single-step implementation, Tracking every destructor method can be found to create the object first be eliminated. When the cross-border use of ia2 subscript, can be found to implement its destructor function will be errors. If ia2 also use cross-border subscript, and the information will pop up assert thus halt.)
文件列表:
类的创建、继承
..............\IntArray.cpp
..............\IntArray.h
..............\IntArrayRC.cpp
..............\IntArrayRC.h
..............\test.cpp
..............\test.dsp
..............\test.dsw
调试过程.swf