void CMirror_Dot::ResetDot()
{
try
{
next_rank=NULL; //指向下一层的镜像点
next_Dot=NULL; //指向同一层下一个镜像点
throw "a";
}
catch(char *)
{
AfxMessageBox( "catchednextdot" ) ; }
// last_layer=true; //将最后一层标记初始化为true
try
{
traverse_flag=false; //将遍历标记为false
point_on_flag=false; //将点在面上的标记设为false
is_diffraction_dot=false; //将绕射点判断标记为false
throw "a";
}
catch(char *)
{
AfxMessageBox( "catchedflag" ) ; }
}
一直异常啊
is_diffraction_dot是私有成员
别的都是mirror_dot的public成员
{
try
{
next_rank=NULL; //指向下一层的镜像点
next_Dot=NULL; //指向同一层下一个镜像点
throw "a";
}
catch(char *)
{
AfxMessageBox( "catchednextdot" ) ; }
// last_layer=true; //将最后一层标记初始化为true
try
{
traverse_flag=false; //将遍历标记为false
point_on_flag=false; //将点在面上的标记设为false
is_diffraction_dot=false; //将绕射点判断标记为false
throw "a";
}
catch(char *)
{
AfxMessageBox( "catchedflag" ) ; }
}
一直异常啊
is_diffraction_dot是私有成员
别的都是mirror_dot的public成员
CMirror_Dot();
virtual ~CMirror_Dot(); CMirror_Dot *next_Dot;
CMirror_Dot *next_rank; CMirror_Dot *parent;
bool traverse_flag;
bool point_on_flag;
{
p = NULL;
// throw "a";
}
catch(char *)
{
printf( "catchednextdot" ) ; }
void CMirror_Tree::destroy_mirror_tree(CMirror_Dot *treePtr)
{
try
{
if(treePtr!=NULL)
{
destroy_mirror_tree(treePtr->next_Dot);
destroy_mirror_tree(treePtr->next_rank);
if(treePtr!=&source) //源点不能被删除
delete treePtr;
//throw "a";
}
}
catch(char *)
{
AfxMessageBox( "catched" ) ; }}
第一次复位的时候程序没有提示错误,经过如上程序之后CMirror_Dot *treePt指向&source
再次复位提示堆栈已经被破坏
treePtr=0;// 如果 treePtr 还用 就 必须=0.
http://download.csdn.net/detail/lghndyz/3314775