请大神指点 在vs2008环境 运行时 出现了 问题

china10nan 发布于 2013/08/27 16:50
阅读 103
收藏 0

#include "stdafx.h"
#include "..\trmnator\trmnator.h"
#include <iostream>
#include <stdlib.h>
using namespace std;

 

void terminator()
{
 cout << "I'll be back!" << endl;
 abort();
}

void(*old_terminate)() = set_terminate(terminator);

class botch
{
public:
 
 class fruit{};
 void f()
 {
  cout << "botch::f()" <<endl;

  throw fruit();

 }
 ~botch()
 {
  throw 'c';
 }
};

int main(int argc, char* argv[])
{
 try
 {
  botch b;
  b.f();
 }
 catch(...)
 {
  cout << "inside catch(...)" << endl;
 }
 system("pause()");
 return 0;
}

Debug Error

This application has requested the Runtime it in an unusual way.

Please contact the application's support team for more information

(Press Retry to debug the application)

返回顶部
顶部