Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QM translation of C++
#14
Yes.

C:
union X { int a; double b; byte c; };

QM:
type X int'a []double'b []byte'c

C#:
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Explicit)]
struct X { [FieldOffset(0)] public int a; [FieldOffset(0)] public double b; [FieldOffset(0)] public byte c; };


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)