DELPHI与C数据类型对照表
『Delphi和C++数据类型对照表』
Delphi字长/值域C++
ShortInt8位有符号整型signed char SmallInt16位有符号整型short
LongInt32位有符号整型int
Byte8位⽆符号整型unsigned char Word16位⽆符号整型unsigned short Integer32位有符号整型int
Cardinal32位⽆符号整型unsigned int Boolean真/假bool
ByteBool真/假或8位⽆符号整型unsigned char WordBool真/假或16位⽆符号整型unsigned short LongBool真/假或32位⽆符号整型BOOL(WinAPI) AnsiChar8位⽆符号字符char WideChar宽字编码字符wchar_t
Char8位⽆符号字符char AnsiString Delphi的字符串类AnsiString类String[n]⽼式的Delphi字符串,n=1..255字节SmallString模板类ShortString⽼式的Delphi字符串,255字节SmallString<255> String Delphi的AnsiString类AnsiString
Single32位浮点数float
Double64位浮点数double Extended80位浮点数long double
Real32位浮点数double
Pointer32⽆类型指针void*
PChar32位字符型指针unsigned char* PAnsiChar32位ANSI型字符指针unsigned char* Comp64位浮点数Comp类OleVariant OLE可变类型值OleVariant类
『Win32API与C语⾔数据类型对照表』Win32API C语⾔
HANDLE void*
BYTE unsigned char
SHORT short
WORD unsigned short
INT int
UINT unsigned int
LONG long
c++string类型
BOOL long
DWORD unsigned long
ULONG unsigned long
CHAR char
LPSTR char*
LPCSTR const char*
LPWSTR wchar_t*
LPCWSTR const wchar_t*
FLOAT float
DOUBLE double

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。