I was looking at integer limits in C++ and it looks like both int
and long
have the exact same maximums and minimums (32-bit limit, looks like), even when unsigned.
Is there any functional difference between a long
and int
? When should one be used over the other?