Yes, in addition to short, int, and long, C++ provides several other integer types:
-
long long: Typically uses 8 bytes (64 bits) and is guaranteed to be at least as large as
long. -
unsigned short: A variant of
shortthat can only represent non-negative values, typically using 2 bytes. -
unsigned int: A variant of
intthat can only represent non-negative values, typically using 4 bytes. -
unsigned long: A variant of
longthat can only represent non-negative values, typically using either 4 or 8 bytes. -
unsigned long long: A variant of
long longthat can only represent non-negative values, typically using 8 bytes.
These unsigned types allow for a greater positive range since they do not need to account for negative values.
