I think you think this is wrong.
If you need a negative number, you should not declare the variable as unsigned.
If your problem is a range of values ββand you need one more bit, then you can use a "larger" data type (for example, int 64).
Then, if you use outdated code, creating a new structure may solve your problem, but this is due to your specific situation, C ++ should not handle it.
Diego pereyra
source share