Share via


Standard Types

 

The latest version of this topic can be found at Standard Types.

The Microsoft run-time library defines the following standard types and typedefs.

Fixed-width integral types (stdint.h)

Name Equivalent built-in type
int8_t, uint8_t signed char, unsigned char
int16_t, int16_t short, unsigned short
int32_t, uint32_t int, unsigned int
int64_t, int64_t long long, unsigned long long
int_least8_t, uint_least8_t signed char, unsigned char
int_least16_t, uint_least16_t short, unsigned short
int_least32_t, uint_least32_t int, unsigned int
int_least64_t, uint_least64_t long long, unsigned long long
int_fast8_t, uint_fast8_t signed char, unsigned char
int_fast16_t, uint_fast16_t int, unsigned int
int_fast32_t, uint_fast32_t int, unsigned int
int_fast64_t, uint_fast64_t long long, unsigned long long
intmax_t, uintmax_t long long, unsigned long long
Type Description Declared in
clock_t (long) Stores time values; used by clock. TIME.H
_complex structure Stores real and imaginary parts of complex numbers; used by _cabs. MATH.H
_CRT_ALLOC_HOOK A type define for the user-defined hook function. Used in _CrtSetAllocHook. CRTDBG.H
_CRT_DUMP_CLIENT,

 _CRT_DUMP_CLIENT_M
A type define for a call-back function that will get called in _CrtMemDumpAllObjectsSince. CRTDBG.H
_CrtMemState structure Provides information about the current state of the C run-time debug heap. CRTDBG.H
_CRT_REPORT_HOOK,

 _CRT_REPORT_HOOKW,

 _CRT_REPORT_HOOKW_M
A type define for a call-back function that will get called in _CrtDbgReport.

The parameters for this function are: report type, output message and the return value from the call-back function.
CRTDBG.H
dev_t, _dev_t short or unsigned integer Represents device handles. SYS\TYPES.H
_diskfree_t structure Contains information about a disk drive. Used by _getdiskfree. DOS.H and DIRECT.H
div_t, ldiv_t and lldiv_t structures Store values returned by div, ldiv, and lldiv, respectively. STDLIB.H
errno_t integer Used for a function return type or parameter that deals with the error codes of errno. STDDEF.H,

CRTDEFS.H
_exception structure Stores error information for _matherr. MATH.H
_EXCEPTION_POINTERS Contains an exception record. See EXCEPTION_POINTERS for more information. FPIEEE.H
FILE structure Stores information about current state of stream; used in all stream I/O operations. STDIO.H
_finddata_t, _wfinddata_t, _finddata32_t, _wfinddata32_t, _finddatai64_t, _wfinddatai64_t, __finddata64_t, __wfinddata64_t, __finddata32i64_t, __wfinddata32i64_t, __finddata64i32_t, __wfinddata64i32_t structures Store file-attribute information returned by _findfirst, _wfindfirst, and related functions and _findnext, _wfindnext and related functions. See Filename Search Functions for information on structure members. IO.H, WCHAR.H
_FPIEEE_RECORD structure Contains information pertaining to IEEE floating-point exception; passed to user-defined trap handler by _fpieee_flt. FPIEEE.H
fpos_t (long integer, __int64, or structure, depending on the target platform) Used by fgetpos and fsetpos to record information for uniquely specifying every position within a file. STDIO.H
_fsize_t (unsigned long integer) Used to represent the size of a file. IO.H,

WCHAR.H
_HEAPINFO structure Contains information about next heap entry for _heapwalk. MALLOC.H
_HFILE (void *) An operating system file handle. CRTDBG.H
imaxdiv_t The type of value that's returned by the imaxdiv function, containing both the quotient and the remainder. inttypes.h
ino_t, _ino_t (unsigned short) For returning status information. WCHAR.H
intmax_t A signed integer type capable of representing any value of any signed integer type. stdint.h
intptr_t (long integer or __int64, depending on the target platform) Stores a pointer (or HANDLE) on both Win32 and Win64 platforms. STDDEF.H and other include files
jmp_buf array Used by setjmp and longjmp to save and restore program environment. SETJMP.H
lconv structure Contains formatting rules for numeric values in different countries/regions. Used by localeconv. LOCALE.H
_LDOUBLE,

 _LONGDOUBLE,

 _LDBL12 (long double or an unsigned char array)
Use to represent a long double value. STDLIB.H
_locale_t structure Stores current locale values; used in all locale specific C run-time libraries. CRTDEF.H
mbstate_t Tracks the state of a multibyte character conversion. WCHAR.H
off_t, _off_t long integer Represents file-offset value. WCHAR.H, SYS\TYPES.H
_onexit_t,

 _onexit_m_t pointer
Returned by _onexit, _onexit_m. STDLIB.H
_PNH pointer to function Type of argument to _set_new_handler. NEW.H
ptrdiff_t (long integer or __int64, depending on the target platform) Result of subtraction of two pointers. CRTDEFS.H
_purecall_handler,

 _purecall_handler_m
A type define for a call-back function that is called when a pure virtual function is called. Used by _get_purecall_handler, _set_purecall_handler. A _purecall_handler function should have a void return type. STDLIB.H
_RTC_error_fn type define A type define for a function that will handle run-time error checks. Used in _RTC_SetErrorFunc. RTCAPI.H
_RTC_error_fnW type define A type define for a function that will handle run-time error checks. Used in _RTC_SetErrorFuncW. RTCAPI.H
_RTC_ErrorNumber enumeration Defines error conditions for _RTC_GetErrDesc and _RTC_SetErrorType. RTCAPI.H
_se_translator_function A type define for a call-back function that translates an exception. The first parameter is the exception code and the second parameter is the exception record. Used by _set_se_translator. EH.H
sig_atomic_t integer Type of object that can be modified as atomic entity, even in presence of asynchronous interrupts; used with signal. SIGNAL.H
size_t (unsigned __int64 or unsigned integer, depending on the target platform) Result of sizeof operator. CRTDEFS.H and other include files
_stat structure Contains file-status information returned by _stat and _fstat. SYS\STAT.H
__stat64 structure Contains file-status information returned by _fstat64 and _stat64, and _wstat64. SYS\STAT.H
_stati64 structure Contains file-status information returned by _fstati64, _stati64, and _wstati64. SYS\STAT.H
terminate_function type define A type define for a call-back function that is called when terminate is called. Used by set_terminate. EH.H
time_t (__int64 or long integer) Represents time values in mktime, time, ctime, _ctime32, _ctime64, _wctime, _wctime32, _wctime64, ctime_s, _ctime32_s, _ctime64_s, _wctime_s, _wctime32_s, _wctime64_s, ctime, _ctime32, _ctime64, _wctime, _wctime32, _wctime64 and gmtime, _gmtime32, _gmtime64. The number of seconds since January 1, 1970, 0:00 UTC. If _USE_32BIT_TIME_T is defined, time_t is a long integer. If not defined, it is a 64-bit integer. TIME.H,

SYS\STAT.H,

SYS\TIMEB.H
__time32_t (long integer) Represents time values in mktime, _mktime32, _mktime64, ctime, _ctime32, _ctime64, _wctime, _wctime32, _wctime64, ctime_s, _ctime32_s, _ctime64_s, _wctime_s, _wctime32_s, _wctime64_s, gmtime, _gmtime32, _gmtime64 and localtime, _localtime32, _localtime64. CRTDEFS.H, SYS\STAT.H,

SYS\TIMEB.H
__time64_t (__int64) Represents time values in mktime, _mktime32, _mktime64, _ctime64, _wctime64, ctime_s, _ctime32_s, _ctime64_s, _wctime_s, _wctime32_s, _wctime64_s, _gmtime64, _localtime64 and _time64. TIME.H,

SYS\STAT.H,

SYS\TIMEB.H
_timeb structure Used by _ftime and _ftime_s, _ftime32_s, _ftime64_s to store current system time. SYS\TIMEB.H
__timeb32 structure Used by _ftime, _ftime32, _ftime64 and _ftime_s, _ftime32_s, _ftime64_s to store current system time. SYS\TIMEB.H
__timeb64 structure Used by _ftime64 and _ftime_s, _ftime32_s, _ftime64_s to store current system time. SYS\TIMEB.H
tm structure Used by asctime, _wasctime, asctime_s, _wasctime_s, gmtime, _gmtime32, _gmtime64, gmtime_s, _gmtime32_s, _gmtime64_s, localtime, _localtime32, _localtime64, localtime_s, _localtime32_s, _localtime64_s, mktime, _mktime32, _mktime64 and strftime, wcsftime, _strftime_l, _wcsftime_l to store and retrieve time information. TIME.H
uintmax_t An unsigned integer type capable of representing any value of any unsigned integer type. stdint.h
uintptr_t (long integer or __int64, depending on the target platform) An unsigned integer or unsigned __int64 version of intptr_t. STDDEF.H and other include files
unexpected_function A type define for a call-back function that is called when unexpected is called. Used by set_unexpected. EH.H
_utimbuf structure Stores file access and modification times used by _utime, _wutime and _futime, _futime32, _futime64 to change file-modification dates. SYS\UTIME.H
_utimbuf32 structure Stores file access and modification times used by _utime, _utime32, _utime64, _wutime, _wutime32, _wutime64 and _futime, _futime32, _futime64 to change file-modification dates. SYS\UTIME.H
__utimbuf64 structure Used by _utime64, _wutime64 and _futime64 to store the current time. SYS\UTIME.H
va_list structure Used to hold information needed by va_arg and va_end macros. Called function declares variable of type va_list that can be passed as argument to another function. STDARG.H,

CRTDEFS.H
wchar_t wide character Useful for writing portable programs for international markets. STDDEF.H, STDLIB.H,

CRTDEFS.H,

SYS\STAT.H
wctrans_t integer Represents locale-specific character mappings. WCTYPE.H
wctype_t integer Can represent all characters of any language character set. WCHAR.H,

CRTDEFS.H
wint_t integer Type of data object that can hold any wide character or wide end-of-file value. WCHAR.H,

CRTDEFS.H

See Also

C Run-Time Library Reference