Re: Issue De-referencing a Pointer to a Struct in an Array

2023-07-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/14/23 1:23 PM, Pen Hall wrote: I think i figured out my issue... The issue was that 'board' is a pointer, and all of the ways I tried to de-reference it, failed. I just tried the form `(*board)[number][symbol][letter]` which worked to de-reference it.

Re: Issue De-referencing a Pointer to a Struct in an Array

2023-07-14 Thread Pen Hall via Digitalmars-d-learn
On Friday, 14 July 2023 at 17:14:01 UTC, Pen Hall wrote: On Friday, 14 July 2023 at 16:57:33 UTC, Pen Hall wrote: Hello! In my program, I have defined a struct called `Tile` in the global scope. In my `main()` function I create a 3d array of `Tile`s called `board`. I then have a function

Re: Issue De-referencing a Pointer to a Struct in an Array

2023-07-14 Thread Pen Hall via Digitalmars-d-learn
On Friday, 14 July 2023 at 16:57:33 UTC, Pen Hall wrote: Hello! In my program, I have defined a struct called `Tile` in the global scope. In my `main()` function I create a 3d array of `Tile`s called `board`. I then have a function called `loopBoard()` that loops through certain parts of

Issue De-referencing a Pointer to a Struct in an Array

2023-07-14 Thread Pen Hall via Digitalmars-d-learn
Hello! In my program, I have defined a struct called `Tile` in the global scope. In my `main()` function I create a 3d array of `Tile`s called `board`. I then have a function called `loopBoard()` that loops through certain parts of `board`. I then create a reference to the `Tile` struct at