Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the Delphi equivalent of ' unsigned char** ' in C

Tags:

c

delphi

What is the Delphi equivalent of

unsigned char** ' 

in C

i'm not sure if its a pointer to an array or a pointer to a pointer or if the two things are the same in C.

like image 346
Mike Taylor Avatar asked Dec 04 '25 15:12

Mike Taylor


1 Answers

EDIT In C both pointer to an array and pointer to a pointer have different meaning to the compiler (thanks caf).

In C arrays are simply block of memory. There is no such function like Length(array), Low(array) or High(array) that you can use on Pascal arrays. For practical purpose to Pascal programmers C arrays can be usually ported to Pascal pointers, especially on function calls to various API.

If we assume that usigned char can be translated to byte in Delphi, then unsigned char * can be translated to ^byte that is usually done via type declaration that can look like:

type
  PByte = ^byte;
  PPByte = ^PByte;

If you are trying to convert some C code, especially .h header file then look at headconv.

like image 148
Michał Niklas Avatar answered Dec 07 '25 05:12

Michał Niklas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!