<<< | Index | >>> |
struct AcctError { std::string problem; AcctError( std::string str ) { problem = str; } }; void Account::withdraw( double amount ) { if ( amount > m_available_balance ) { throw AcctError( "Insufficient funds." ); } //... }
<<< | Index | >>> |