Comparison between Delphi and C/C ++ Data Types

Source: Internet
Author: User
Delphi Data Type C/C ++
Shorint 8-bit signed integer Char
Byte 8-bit unsigned integer Byte, unsigned short
Smallint 16-bit signed integer Short
Word 16-bit unsigned integer Unsigned short
Integer, longint 32-bit signed integer Int, long
Cardinal, longword/DWORD 32-bit unsigned integer Unsigned long
Int64 64-bit signed integer _ Int64
Single 4-byte floating point number Float
* Real48 6-byte floating point number
Double 8-byte floating point number Double
* Extended 10-byte floating point number Long double
Currency 64-bit currency type
Tdate/tdatetime 8-byte date/time
Variant, olevariant 16-Byte variable type Variant, ^ variant, ^ olevariant
Char, ansichar 1 byte Char
Widechar 2 bytes Wchar
* Optional string Short string
Ansistring/string Long String ^ Ansistring
Widestring Wide string ^ Widestring
Pchar, pansichar Null end string Char *
Pwidechar Null-terminated wide string Lpcwstr
Boolean, bytebool 1-byte Boolean Type Any 1 byte
Wordbool 2-byte Boolean Type Any 2 bytes
Bool, longbool 4-byte Boolean Type Bool
Note: The forward compatibility type with the * prefix and the C ++ builder special type with the ^ prefix.
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.