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

前端 未结 3 1624
终归单人心
终归单人心 2020-12-19 08:11

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

public unsafe struct StructWithFixedBuffer
{
    public fixed char F         


        
3条回答
  •  眼角桃花
    2020-12-19 08:36

    The C# syntax was added as a way to express the C++ syntax you've know forever. :)

    public:
        wchar_t FixedBuffer[128];
    

提交回复
热议问题