|
Subject:
|
Dynamic array of struct
|
|
Posted By:
|
bobwrx
|
Post Date:
|
9/13/2006 9:28:51 AM
|
Hi, I've just migrated from VB.NET Suppose that I have defined the struct as below struct MyStruct { int i; int j; int [] N; }
Then when I declared my array of struct like MyStruct [] Strc;
It was ok but when I compiled it, I got the error that it should be assigned. I found out that I need to use the New(). However, I dont know how to declare and assign with New.
Thanks for your responce.
|
|
Reply By:
|
MAKO
|
Reply Date:
|
9/13/2006 10:45:38 AM
|
MyStruct[] Strc = new MyStruc[index];
MAKO - "El super simio"
|
|
Reply By:
|
bobwrx
|
Reply Date:
|
9/14/2006 6:12:31 AM
|
Thanks, That's right, But how should I Delcalre the array N of the struct.
|