Comment by voidUpdate
5 hours ago
you could check if ret > ret * 10 + characters[i]-48, if so it has wrapped around and you return an error
5 hours ago
you could check if ret > ret * 10 + characters[i]-48, if so it has wrapped around and you return an error
For unsigned that could work, but signed overflow is UB.
[dead]