Delphi 與 C/C++ 資料類型對照表

來源:互聯網
上載者:User
Delphi 資料類型 C/C++
ShorInt 8位有符號整數 char
Byte 8位不帶正負號的整數 BYTE,unsigned short
SmallInt 16位有符號整數 short
Word 16位不帶正負號的整數 unsigned short
Integer,LongInt 32位有符號整數 int,long
Cardinal,LongWord/DWORD 32位不帶正負號的整數 unsigned long
Int64 64位有符號整數  _int64
Single 4位元組浮點數 float
*Real48 6位元組浮點數  
Double 8位元組浮點數 double
*Extended 10位元組浮點數 long double
Currency 64位貨幣類型  
TDate/TDateTime 8位元組日期/時間  
Variant,OleVariant 16位元組可變類型 VARIANT,^Variant,^OleVariant
Char,AnsiChar 1位元組字元 char
WideChar 2位元組字元 WCHAR
*ShortString 短字串  
AnsiString/String 長字串 ^AnsiString
WideString 寬字元串 ^WideString
PChar,PAnsiChar NULL結束的字串 char*
PWideChar NULL結束的寬字元串 LPCWSTR
Boolean,ByteBool 1位元組布爾類型 任何1位元組
WordBool 2位元組布爾類型 任何2位元組
BOOL,LongBool 4位元組布爾類型 BOOL
註:有*首碼的是向前相容類型;有^首碼的是C++Builder特有類型。
C/C++ Delphi
ABC TABC
ACCEL TAccel
ATOM TAtom
BITMAP TBitMap
BITMAPCOREHEADER TBitmapCoreHeader
BITMAPCOREINFO TBitmapCoreInfo
BITMAPFILEHEADER TBitmapFileHeader
BITMAPINFO TBitmapInfo
BITMAPINFOHEADER TBitmapInfoHeader
BOOL Bool
CBT_CREATEWND TCBT_CreateWnd
CBTACTIVATESTRUCT TCBTActivateStruct
CHAR Char
CHAR* PChar
CLIENTCREATESTRUCT TClientCreateStruct
COLORREF TColorRef
COMPAREITEMSTRUCT TCompareItemStruct
COMSTAT TComStat
CREATESTRUCT TCreateStruct
CTLINFO TCtlInfo
CTLSTYLE TCtlStyle
CTLtype TCtltype
DCB TDCB
DDEAACK TDDEAck
DDEADVISE TDDEAdvise
DDEDATA TDDEData
DDEPOKE TDDEPoke
DEBUGHOOKINFO TDebugHookInfo
DELETEITEMSTRUCT TDeleteItemStruct
DEVMODE TDevMode
DOUBLE Double
DRAWITEMSTRUCT TDrawItemStruct
DWORD LongInt
ENUMLOGFONT TEnumLogFont
EVENTMSG TEventMsg
FARPROC TFarProc
FIXED TFixed
FLOAT Single
GLYPHMETRICS TGlyphMetrics
HANDLE THandle
HANDLETABLE THandleTable
HARDWAREHOOKSTRUCT THardwareHookStruct
HELPWININFO THelpWinInfo
INT Integer
KERNINGPAIR TKerningPair
LOGBRUSH TLogBrush
LOGFONT TLogFont
LOGPALETTE TLogPalette
LOGPEN TLogPen
LONG LongInt
LONG DOUBLE Extended
LONG INT LongInt
LPSTR PChar
LPWSTR PWideChar
MAT2 TMat2
MDICREATESTRUCT TMDICreateStruct
MEASUREITEMSTRUCT TMeasureItemStruct
MENUITEMTEMPLATE TMenuItemTemplate
MENUITEMTEMPLATEHEADER TMenuItemTemplateHeader
METAFILEPICT TMetaFilePict
METAHEADER TMetaHeader
METARECORD TMetaRecord
MINMAXINFO TMinMaxInfo
MOUSEHOOKSTRUCT TMouseHookStruct
MSG TMsg
MULTIKEYHELP TMultiKeyHelp
NCCALCSIZE_PARAMS TNCCalcSize_Params
NEWTEXTMETRIC TNewTextMetric
OFSTRUCT TOFStruct
OUTLINETEXTMETRIC TOutlineTextMetric
PAINTSTRUCT TPaintStruct
PALETTEENTRY TPaletteEntry
PANOSE TPanose
PATTERN TPattern
POINTFX TPointFX
PSTR PChar
PWSTR PWideChar
RASTERIZER_STATUS TRasterizer_Status
RGBQUAD TRGBQuad
RGBTRIPLE TRGBTriple
SEGINFO TSegInfo
SHORT SmallInt
SHORT INT SmallInt
SIZE TSize
TEXTMETRIC TTextMetric
TPOINT TPoint
TRECT TRect
TTPOLYCURVE TTTPolyCurve
TTPOLYGONHEADER TPolygonHeader
UINT Word
UNSIGNED Word
UNSIGNED CHAR Byte
UNSIGNED INT Word
UNSIGNED LONG LongInt(DWORD)
UNSIGNED LONG INT LongInt
UNSIGNED SHORT Word
UNSIGNED SHORT INT Word
VOID* Pointer
WINDOWPLACEMENT TWindowPlacement
WINDOWPOS TWindowPos
WNDCLASS TWndClass
WORD Word
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.