이거 출력이

 

a b

인데요.....a까지는 알겠는데 왜 c가 아닌 b가 나오는지 모르겠어요....


 

고수님들 알려주세요.ㅜㅜ


 

 ============= 밑에 복붙하기 쉽게 텍스트로 붙여넣을께요. ===================


#include <iostream>
using namespace std;

class str1
{
};
class str2 : public str1
{
};
class str3 : public str1, public str2
{

};
void exp(int q)
{
 try{
  if(q % 2 == 0)
   throw str3();
 }
 catch(str3){
  cout << "a ";
  throw;
 }
}

int main()
{
 try{
  exp(20);
 }
 catch(str1)
 {
  cout << "c ";  
 }
 catch(str2)
 {
  cout << "b ";
 } 
}