Delphi to C++ types mapping
Go Up to Support for Delphi Data Types and Language Concepts
Below is a list of Delphi data types and the corresponding C++ data types:
| Delphi type | defined in sysmac.h | Platform | Corresponding C++ type |
|---|---|---|---|
|
Boolean |
bool | ||
|
ShortInt |
System::Int8 |
signed char | |
|
SmallInt |
short | ||
|
Integer |
int | ||
|
Int64 |
__int64 | ||
|
Byte |
System::Byte |
unsigned char | |
|
Word |
System::Word |
unsigned short | |
|
Cardinal |
unsigned | ||
|
UInt64 |
unsigned __int64 | ||
| NativeInt | System::NativeInt | 32-bit platforms | int |
| 64-bit Windows | __int64 | ||
| 64-bit iOS 64-bit Linux |
long | ||
| NativeUInt | System::NativeUInt | 32-bit platforms | unsigned int |
| 64-bit Windows | unsigned __int64 | ||
| 64-bit iOS 64-bit Linux |
unsigned long | ||
| LongInt | 32-bit platforms 64-bit Windows |
int | |
| 64-bit iOS 64-bit Linux |
long | ||
| LongWord | 32-bit platforms 64-bit Windows |
unsigned | |
| 64-bit iOS 64-bit Linux |
unsigned long | ||
|
FixedInt |
int | ||
|
FixedUInt |
unsigned int | ||
|
Single |
float | ||
|
Double |
double | ||
|
Extended |
System::Extended |
long double | |
|
Currency |
System::Currency, System::CurrencyBase |
||
|
Comp |
System::Comp, System::CompBase |
||
|
Real |
double | ||
|
ShortString |
System::ShortString, System::ShortStringBase |
||
|
OpenString |
System::OpenString |
char* const | |
| String | System::UnicodeString | ||
| WideString | System::WideString | ||
| AnsiChar | char | ||
| Char | System::WideChar | Windows platforms | wchar_t |
| Posix platforms | char16_t | ||
| WideChar | System::WideChar | Windows platforms | wchar_t |
| Posix platforms | char16_t | ||
|
File |
System::file |
||
|
Text |
System::TextFile |
||
|
ByteBool |
System::ByteBool |
unsigned char | |
|
WordBool |
System::WordBool |
unsigned short | |
|
LongBool |
System::LongBool |
int | |
|
Real48 |
not supported in C++ | ||
|
Pointer |
void* | ||
|
PWideChar |
System::WideChar* |
Windows platforms | wchar_t* |
| Posix platforms | char16_t* | ||
|
PAnsiChar |
char* | ||
|
Variant |
System::Variant defined in sysvari.h |
||
|
OleVariant |
System::OleVariant defined in sysvari.h |
||
- Note: 32-bit platforms include 32-bit Windows, 32-bit macOS, 32-bit iOS, and Android.
POSIX platforms include macOS, iOS, iOS-simulator, Android, and Linux.