Re: Initializing multidimentional Array with a struct

2012-03-31 Thread Chris Pons
Yes sorry, I was looking to initialize to the default value of node. Thank you for the help! On Saturday, 31 March 2012 at 21:59:50 UTC, Ali Çehreli wrote: On 03/31/2012 02:34 PM, Chris Pons wrote: > I'm trying to figure out how to initialize a multi-dimentional array > with a struct. I thought

Re: Initializing multidimentional Array with a struct

2012-03-31 Thread Ali Çehreli
On 03/31/2012 02:34 PM, Chris Pons wrote: > I'm trying to figure out how to initialize a multi-dimentional array > with a struct. I thought it would be straight forward, but i'm running > into problems. I'm using nested for loops, and just setting the current > index to a blank version of my struc

Re: Initializing multidimentional Array with a struct

2012-03-31 Thread Chris Pons
I also tried this, which gives an out of range error: void InitializePathGraph() { PathGraph.length = mapWidth; foreach( elem; PathGraph ) { elem.length = mapHeight; }