Delphi to C++ types mapping
Go Up to Support for Delphi Data Types and Language Concepts
Below you can find a list of Delphi data types and the corresponding C++ data types:
| Delphi type | defined in sysmac.h | Platform | Corresponding C++ type | 
|---|---|---|---|
| System::Boolean | bool | ||
| System::Int8 | signed char | ||
| System::SmallInt | short | ||
| System::Integer | int | ||
| System::Int64 | __int64 | ||
| System::Byte | unsigned char | ||
| System::Word | unsigned short | ||
| System::Cardinal | unsigned | ||
| System::UInt64 | unsigned __int64 (unsigned long long) | ||
| NativeInt | System::NativeInt | 32-bit platforms | int | 
| 64-bit platforms | __int64 | ||
| NativeUInt | System::NativeUInt | 32-bit platforms | unsigned int | 
| 64-bit platforms | unsigned __int64 | ||
| LongInt | System::Longint | 32-bit platforms 64-bit Windows | int | 
| 64-bit POSIX Platforms | long | ||
| LongWord | 32-bit platforms 64-bit Windows | unsigned | |
| 64-bit POSIX Platforms | unsigned long | ||
| int | |||
| unsigned int | |||
| System::Single | float | ||
| System::Double | double | ||
| System::Extended | long double | ||
| System::Currency, System::CurrencyBase | |||
| System::Comp, System::CompBase | |||
| double Note: The mapping assumes {$REALCOMPATIBILITY OFF} | |||
| System::ShortString, System::ShortStringBase | |||
| 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 | ||
| System::file | |||
| System::TextFile | |||
| System::ByteBool | unsigned char | ||
| System::WordBool | unsigned short | ||
| System::LongBool | int | ||
| not supported in C++ | |||
| void* | |||
| System::WideChar* | Windows platforms | wchar_t* | |
| POSIX platforms | char16_t* | ||
| char* | |||
| System::Variant defined in sysvari.h | |||
| System::OleVariant defined in sysvari.h | |||
Note:  32-bit platforms include 32-bit Windows and Android.
POSIX platforms supported by C++ include iOS, Android, and Linux.
POSIX platforms supported by C++ include iOS, Android, and Linux.