4 ms·
> Do you know that in MSVC uint16_t(50000) + uin16_t(50000) == -1794967296? There are two typos in this statement, one is "uin16_t" should have been "uint16_t"
by omoikane 3y ago
> Do you know that in MSVC uint16_t(50000) + uin16_t(50000) == -1794967296?
There are two typos in this statement, one is "uin16_t" should have been "uint16_t", the other is that the "+" should have been "*". Searching for 1794967296 yields this answer:
https://stackoverflow.com/questions/18161443/type-casting-when-exceeding-the-limit/18161450#18161450 https://stackoverflow.com/questions/18161443/type-casting-wh...