请问一个exception题目# Programming - 葵花宝典
a*U
1 楼
#include
#include
using namespace std;
class A{
public:
A(){}
~A(){throw "aa";}
};
int main(int argc, char** argv){
try{
A a;
try{
A b;
A c;
}catch(...){
cout<}
}catch(...){
cout<}
cout<return 0;
}
program crash. 请问怎么就crash了?
如果去掉"A c;",一切正常. 谢谢!
#include
using namespace std;
class A{
public:
A(){}
~A(){throw "aa";}
};
int main(int argc, char** argv){
try{
A a;
try{
A b;
A c;
}catch(...){
cout<}
}catch(...){
cout<}
cout<return 0;
}
program crash. 请问怎么就crash了?
如果去掉"A c;",一切正常. 谢谢!