[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Detecting multiplication overflow
From: Stephan Kulow <coolo () kde ! org>
Date: 2002-02-16 15:38:06
[Download RAW message or body]
On Samstag, 16. Februar 2002 15:14, Ellis Whitehead wrote:
> Hi,
>
> Is there any way to detect multiplication overflow in C++?
>
int result = a * b;
assert(result / a == b);
Just a guess :)
Greetings, Stephan
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic