signed long long int

From Just Solve the File Format Problem
Jump to: navigation, search
File Format
Name signed long long int
Ontology
Released 2011

Whole numbers.png


C++ signed long long int will take at least 64 bits of memory to hold and cannot be less than signed long int in any specific implementation; it can, however, differ from compiler to compiler. It usually gets stored as two's complement integer, but it is not a requirement of the standard.

It can be shortened during declaration or conversion to signed long long, long long int, or just long long. There is another type that is called just long, but there is no "long long long".

long long can safely store values -2⁶³ – 2⁶³-1, if the value gets too large or too small, a roll over can take place. While the fact of a roll over is a guarantee at some point, a coder cannot assume that it will happen in a specific place, LLONG_MIN and LLONG_MAX constants from <climits> library can be used to determine that.

This is the largest built in data type in C++ at this moment, and it was not available until C++11, unless a specific compiler provided it as a non-standard extension.

Other C++ data types of the same size

Other C++ data types storing signed integers

  • signed char at least 8 bits
  • short at least 16 bits, not smaller than signed char
  • int not less than 16 bits, not smaller than short
  • long not less than 32 bits, not smaller than int
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox