Would it not be something like;
LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY];
Given error :
Error 1 Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type. C:\Prog\SAVE\C#\Shutdown\Main.cs 22 86 Shutdown
Error 2 Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) C:\Prog\SAVE\C#\Shutdown\Main.cs 22 87 Shutdown
for the above i have assumed that, you want an array of LUID_AND_ATTRIBUTES type struct , which you have defined before, as comprising of LUID Luid; int32 Attributes.
Exactly. What I try to do is place an array into a struct. I couldn't find an example not even in google.
This one doesn't work :
struct Animals { float Bird; int Rabbit[20]; Int64 Elephant; };
Error 1 Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type. C:\Prog\SAVE\C#\Shutdown\Main.cs 35 42 Shutdown
Error 2 Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) C:\Prog\SAVE\C#\Shutdown\Main.cs 35 43 Shutdown
This one too :
struct Animals { float Bird; int[20] Rabbit; Int64 Elephant; };
Error 1 Array size cannot be specified in a variable declaration (try initializing with a 'new' expression) C:\Prog\SAVE\C#\Shutdown\Main.cs 35 36 Shutdown
Another one :
struct Animals { float Bird; int Rabbit[]; Int64 Elephant; };
Error 1 Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keyword before the field type. C:\Prog\SAVE\C#\Shutdown\Main.cs 35 42 Shutdown
This one works :
struct Animals { float Bird; int[] Rabbit; Int64 Elephant; };
But now I am not able to specify the size of the array:sad:
Any suggestions?