Part12 异常处理 12.1异常处理的思想与程序实现

    异常处理的基本思想   异常处理的语法   //例12-1处理除零异常 #include<iostream> using namespace std; int divide(int x, int y){ if(y == 0) throw x; return x / y; } int main(){ try{ cout << "5/2
相关文章
相关标签/搜索