摘要: #include "stdafx.h"#include #include using namespace std;//定义一个错误类class RangeException{public: const char* range_error; RangeException(const char* s):range_error(s){}};double Fuc(double x, double y){ if(y == 0){ throw RangeException("error of dividing zero.\n"); //抛出一个错误 } retu.. 阅读全文
posted @ 2014-01-27 20:22 Key_Ky 阅读(358) 评论(0) 推荐(0) 编辑