程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> Delphi >> Delphi和C++數據類型對照表

Delphi和C++數據類型對照表

編輯:Delphi

Delphi                 字長/值域                                                                 C++

ShortInt         8位有符號整型                                                     signed   char
SmallInt         16位有符號整型                                                 short
LongInt             32位有符號整型                                                 int
Byte                 8位無符號整型                                                     unsigned   char
Word                 16位無符號整型                                                 unsigned   short
Integer             32位有符號整型                                                 int
Cardinal         32位無符號整型                                                 unsigned   int
Boolean             真/假                                                                     bool
ByteBool         真/假   或   8位無符號整型                                 unsigned   char
WordBool         真/假   或   16位無符號整型                                 unsigned   short
LongBool         真/假   或   32位無符號整型                                 BOOL   (WinAPI)
AnsiChar         8位無符號字符                                                     char
WideChar         寬字編碼字符                                                     wchar_t
Char                 8位無符號字符                                                     char
AnsiString     Delphi的字符串類                                             AnsiString   類
String[n]         老式的Delphi字符串,   n   =   1..255字節         SmallString<n>   模板類
ShortString     老式的Delphi字符串,   255字節                         SmallString<255>
String             Delphi的AnsiString類                                     AnsiString
Single             32位浮點數                                                         float
Double             64位浮點數                                                         double
Extended         80位浮點數                                                         long   double
Real                 32位浮點數                                                         double
Pointer             32無類型指針                                                     void   *
PChar                 32位字符型指針                                                 unsigned   char   *
PAnsiChar         32位ANSI型字符指針                                         unsigned   char   *
Comp                 64位浮點數                                                         Comp   類
OleVariant     OLE可變類型值                                                     OleVariant   類

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved