In C #, I can specify a fixed size using a keyword fixed, for example:
fixed
public unsafe struct StructWithFixedBuffer { public fixed char FixedBuffer[128]; }
How can I express the same in C ++ / CLI?
In one of the C ++ / CLI developers' blogs, a code appeared to solve the template, I will try to find the link.
Ah, found it. He is called inline_array.
inline_array
C # syntax has been added as a way to express C ++ syntax that you know forever. :)
public: wchar_t FixedBuffer[128];
:
128 char 256 . char .
, :
struct StructWithFixedBuffer { char FixedBuffer[128*2]; };