On Monday, 5 December 2022 at 18:01:47 UTC, ag0aep6g wrote:
You can use bracket notation with pointers. You just need to move your closing parenthesis a bit.Assuming that `ptr` is a `void*`, these are all equivalent: ```d (cast(int*) ptr)[i] = whatever; *((cast(int*) ptr) + i) = whatever; *(cast(int*) (ptr + i * int.sizeof)) = whatever; ```
Oh, wow! That's sure interesting! Thanks a lot!