阅读背景:

抛出异常时抛出异常

来源:互联网 

This code:

这段代码:

#include <iostream>
#include <stdexcept>

using namespace std;

int throw_it() {
  throw range_error( "foo" );
}

int main() {
  try {
    throw throw_it();
  }
  catch ( exception const &e ) {
    cerr << e.what() << endl;
    return 0;
  }
}
#include <iostream>
#inclu



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: