Changes for overflow in C++