why does throw “nothing” causes program termination?
问题 const int MIN_NUMBER = 4; class Temp { public: Temp(int x) : X(x) { } bool getX() const { try { if( X < MIN_NUMBER) { //By mistake throwing any specific exception was missed out //Program terminated here throw ; } } catch (bool bTemp) { cout<<"catch(bool) exception"; } catch(...) { cout<<"catch... exception"; } return X; } private: int X; }; int main(int argc, char* argv[]) { Temp *pTemp = NULL; try { pTemp = new Temp(3); int nX = pTemp->getX(); delete pTemp; } catch(...) { cout<<"cought