void pointer casts
|Top Previous Next|
What is translated > void pointer casts
In Delphi frequently void pointers are casted to specific pointer types. C++ compilers produce error messages here, if the cast isn't made explicitly. Delphi2Cpp automatically inserts according cast's to avoid such error messages. E.g.
a : Pointer;
b : PInteger;
b := a;
b = (PInteger) a;
An according cast takes place, if a pointer to another type is expected as parameter in a function call.
List->Add( Item, (TObject*) ((void*) 1 ) );
This page belongs to the Delphi2Cpp Documentation
|Delphi2Cpp home Content|