I am trying to convert an open source C++ project to Delphi(Berlin 10.1). it uses some pointers which i can not find a way to convert them to Delphi pointers. How can i translate this piece code from C++ to Delphi?
Here is the code:
ptr = (double*)malloc(10*sizeof(double)+324);
*Solution = ptr;
type TDoubleArray = array[Word] of Double; PDoubleArray = ^TDoubleArray; ptr: PDoubleArray; GetMem(ptr, 10*sizeof(double)+324); ptr[10*n+1] := y*12; ptr := n; //here you have to check usage case //probably you need 2D array Solution: ^PDoubleArray; Solution^ := ptr;