C++ DATA/VARIABLE Types
Posted: May 6th, 2004, 12:21 am
I decided to compile a list of all the different C++ Variable/Data Types
char-character or integer 8 bits length
short-integer 16 bits length
long-integer 32 bits length
int-Integer. Its length traditionally depends on the length of the system's Word type, thus in MSDOS it is 16 bits long, whereas in 32 bit systems (like Windows 9x/2000/NT and systems that work under protected mode in x86 systems) it is 32 bits long (4 bytes)
float-floating point number
double-double precision floating point number
long double-long double precision floating point number
bool-Boolean value. It can take one of two values: true or false NOTE: this is a type recently added by the ANSI-C++ standard. Not all compilers support it
wchar_t-Wide character. It is designed as a type to store international characters of a two-byte character set. NOTE: this is a type recently added by the ANSI-C++ standard. Not all compilers support it
char-character or integer 8 bits length
short-integer 16 bits length
long-integer 32 bits length
int-Integer. Its length traditionally depends on the length of the system's Word type, thus in MSDOS it is 16 bits long, whereas in 32 bit systems (like Windows 9x/2000/NT and systems that work under protected mode in x86 systems) it is 32 bits long (4 bytes)
float-floating point number
double-double precision floating point number
long double-long double precision floating point number
bool-Boolean value. It can take one of two values: true or false NOTE: this is a type recently added by the ANSI-C++ standard. Not all compilers support it
wchar_t-Wide character. It is designed as a type to store international characters of a two-byte character set. NOTE: this is a type recently added by the ANSI-C++ standard. Not all compilers support it