C++ how to check for overflow in long long

Revision en1, by osource, 2020-12-03 11:16:32

let's say I have 2 numbers x and y. How do I check if x*y results in an overflow in C++?. Both x and y are long long int.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English osource 2020-12-03 11:16:32 163 Initial revision (published)