The easiest way is probably casting: ``` import std.traits; import std.bitmanip;
class Test { byte[4] marray; byte mbyte; } void main() { auto value = [0x12, 0x23, 0x34, 0x45, 0x56]; auto test = cast(Test*) value.ptr; } ```
Timoses via Digitalmars-d-learn Mon, 22 May 2017 23:46:18 -0700
The easiest way is probably casting: ``` import std.traits; import std.bitmanip;
class Test { byte[4] marray; byte mbyte; } void main() { auto value = [0x12, 0x23, 0x34, 0x45, 0x56]; auto test = cast(Test*) value.ptr; } ```