Victor Hannak wrote:
Top posting fixed...my apologies...
Victor, I have only few suggestions to you (since I have never used a system
where such overflow exception was present).
RTFM. Take your manual and read when does such overflow exception occur.
This - even if it will not give you the ahaaaa effect and make you
immediately find the problem - will at least help you on knowing what are
you looking for.
If the previous step did not help to find the error fire up the debugger and
stop your code right before it would run that very return statement.
Examine the programs state and look for such things, which can cause the
overflow (as you have learnt about all of them by reading the manual).
As these overflow (as far as I know) are not standardized for C++ (I might
be very wrong about it) you will need to see your docs (compiler or CPU) to
figure out what can cause such an overflow.
As a last guess it might also be possible that it is not the return
statement itself, but you are trying to put the returned number into a type
(variable?) where it does not fit. But of course it is just a guess, since
I do not know when can such exception occur. But (for example) if the
return value gets converted to int (or something else which might overflow)
you will probably see this as if the return statement itself did throw...
--
WW aka Attila