2008-09-02から1日間の記事一覧

例外の多段伝播

例外処理の一例 #include <iostream> #include <string> using namespace std; class Exception { string str; public: Exception() : str("Error0") {} Exception(const char* m) : str(m) {} void message() { cerr << str << endl; } void setmsg(const char* m) { str = m;</string></iostream>…