12 2011 档案

摘要:确定性析构在有指针的环境下的麻烦之处来自http://rednaxelafx.iteye.com/blog/372310刚考完大软,心里还在郁闷,随便发点牢骚吧…… 昨天同学考C++的时候还有一题,是找出程序错误的题。代码大概是这样: Cpp代码 classA{inti;};classB{A*p;public:B(){p=newA;}~B(){deletep;}};voidfoo(Bb){//...}intmain(){Bb;foo(b);}你看出问题在什么地方了么? =============================================================.. 阅读全文
posted @ 2011-12-03 13:24 madonion 阅读(525) 评论(0) 推荐(0) 编辑