Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
Confusing compile error
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Jeff Relf, post: 1495179"] Hi Pmb ( Pete ), Re: Dividing by zero. I was only referring to floating point math, not integers. Try this ( Compile for release, not debug ): float N = 1, D = 1, DD = -1 ; N /= ( D + DD ); char Output [ 88 ]; sprintf ( Output, "%3.3f", N ); In VC 6, Output becomes: 1.#IO, it runs with no complaints, even in the debugger. [ Note, _isnan( N ) will let you catch that overflow ] When I change everything to integers: In the debugger it throws an exception, outside it hangs. But I also tried to compile this: int i ; i /= 0 ; Which caused this funny result: C:\AA.CPP(253) : fatal error C1001: INTERNAL COMPILER ERROR ( compiler file 'E:\8168\vc98\p2\src\P2\main.c', line 506 ) Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information E:\8168\vc98\p2\src\P2\main.c ? I don't have anything that looks like that. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Confusing compile error
Top