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
相關文章
相關標籤/搜索