Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I specify a fixed-size buffer in C++/CLI?

Tags:

c++-cli

In C#, I can specify a fixed sized buffer using the fixed keyword, like so:

public unsafe struct StructWithFixedBuffer
{
    public fixed char FixedBuffer[128];
}

how would I express the same thing in C++/CLI?

like image 748
Simon Avatar asked Jan 26 '10 09:01

Simon


1 Answers

One of the C++/CLI developer blogs had code for a template solution to this, I'll try to find a link.

Ahh, found it. It's called inline_array.

like image 186
Ben Voigt Avatar answered Sep 20 '22 23:09

Ben Voigt