- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The integer value is different for intel C++ compiler and visual studio MSVC compiler.
The value of 1E10 when assigned to an integer is "1410065408" for MSVC compiler and whereas for intel C++ is "-2147483648". Could you explain why the value is not same for both the compilers.
Due to this the same code is causing runtime exceptions when compiled through intel C++ compiler.
Thanks,
Pradeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1E10 is beyond the range of int (32-bit integer). Thus behavior is undefined.
Consider using int64_t integer type for numbers that large.
Jim Dempsey
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1E10 is beyond the range of int (32-bit integer). Thus behavior is undefined.
Consider using int64_t integer type for numbers that large.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jim Dempsey,
Thank you for the prompt response.
Thanks,
Pradeep
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page