Page 1 of 1

C# type to C++

Posted: Tue Jun 17, 2014 6:02 pm
by Ekey
I'm rly bad know Sharp but maybe someone can explain what this?

Code: Select all

private uint[][] pTransparent;
It's something like this ?

Code: Select all

DWORD ** pTransparent
or

Code: Select all

DWORD ** pTransparent []
? :scaredy:

Re: C# type to C++

Posted: Wed Jun 18, 2014 9:59 am
by deepshit

Code: Select all

private uint[][] pTransparent;
This is called jagged arrays in c#. (array of arrays)

And afaik this can be set up to function like jagged arrays.

Code: Select all

DWORD ** pTransparent


or you can use a 2d array in c++.

Code: Select all

uint[5][] pTransparent;

Re: C# type to C++

Posted: Wed Jun 18, 2014 9:56 pm
by Ekey
Thanks I figured out

Code: Select all

unsigned int pT1[] = { 0, 0, 0, 0 };
unsigned int pT2[] = { 0, 0, 0, 0 };
static unsigned int *pTransparent[2] = { *pT1, *pT2, };
It works! :)