以下はVC++でのデータ型となります。
 
データ型 サイズ 意味 範囲
bool 1Byte 論理型 true(0以外) / false(0)
char 1Byte 文字型 -128 ~ 127
unsigned char 1Byte 符号なし文字型 0 ~ 255
wchar_t 2Byte ワイド文字型   -
short (int) 2Byte 短長整数型 -32768 ~ 32767
unsigned short (int) 2Byte 符号なし短長整数型 0 ~ 65535
int 4Byte 整数型 -2147486948 ~ 2147483647
unsigned (int) 4Byte 符号なし整数型 0 ~ 4294967295
long (int) 4Byte 長整数型 -2147486948 ~ 2147483647
unsigned long (int) 4Byte 符号なし長整数型 0 ~ 4294967295
float 4Byte 単精度浮動小数点型 -3.4E+38 ~ 3.4E+38
double 8Byte 倍精度実数 -1.7E+308 ~ 1.7E+308
long double 8Byte 拡張精度浮動小数点型 -1.7E+308 ~ 1.7E+308 
__int8 1Byte  拡張整数型 -128 ~ 127
__int16 2Byte  拡張整数型  -32768 ~ 32767
__int32 4Byte 拡張整数型 -2147483648 ~ 2147483647
__int64 8Byte 拡張整数型 -9223372036854775808 ~ 9223372036854775807
void 0Byte 空のデータ型   -
最終更新:2008年12月19日 02:08