class that is initialized becomes null when outside of function
Flaze07
christianseiji.cs at gmail.com
Mon Jul 9 09:42:20 UTC 2018
On Monday, 9 July 2018 at 09:38:30 UTC, ag0aep6g wrote:
> The `win` you're creating in `init` is a function-local
> variable. It ceases to exist when `init` returns. It's not
> `this.win`.
>
> In `run`, you're accessing `this.win`. It's still null because
> you never assigned anything there.
>
> So change `auto win = ...;` to `this.win = ...;` or simply `win
> = ...;`.
oops, I forgot... haha what a silly mistake, thank you
More information about the Digitalmars-d-learn
mailing list