Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int64 myint64::add (int64 a, int64 b) {
- if (MAX_INT64 - a > b) {
- // error condition here.
- }
- return a + b;
- }
- int64 myint64::mul (int64 a, int64 b) {
- if (MAX_INT64 / a > b) {
- // error condition here.
- }
- return a * b;
- }
Add Comment
Please, Sign In to add comment