下面代码中,第7行横线处应该填入class MyExcept {}; int main() { try { MyExcept ex; throw ex; } catch (________) { } return 0; }
A: MyExcept &e
B: MyExcept *e
C: MyExcept ~e
D: std::exception e
E: std::exception &e
A: MyExcept &e
B: MyExcept *e
C: MyExcept ~e
D: std::exception e
E: std::exception &e
举一反三
- 下面代码中,第7行横线处应该填入class MyExcept {}; int main() { try { MyExcept ex; throw ex; } catch (________) { } return 0; } A: MyExcept &e B: MyExcept *e C: MyExcept ~e D: std::exception e E: std::exception &e
- 中国大学MOOC: 下面代码中,第7行横线处应该填入class MyExcept {};int main() { try { MyExcept ex; throw ex; } catch (________) { } return 0;}
- 中国大学MOOC:"如下程序的输出是什么____#include #include using namespace std;struct MyException : public exception{ const char * what () const throw () { return "C++ Exception"; }};int main(){ try { throw MyException(); } catch(MyException& e) { std::cout << "MyException" << std::endl; } catch(std::exception& e) { std::cout<<"exception" << std::endl; }}";
- Java中,下面捕获异常的语句不正确的是( )。 A: try{……}finally{……} B: try{……}catch(Exception ex){……} C: try{ try{……}}catch(Exception ex){……} D: try{ try{……} finally{……}}catch(Exception ex){……}
- 智慧职教: 现有: 1. class Birds { 2. public static void main (String [] args) { 3. try { 4. throw new Exception () ; 5. } catch (Exception e) { 6. try { 7. throw new Exception () ; 8. } catch (Exceptio