Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
449 views
in Technique[技术] by (71.8m points)

c++ cli - How do I specify a fixed-size buffer in 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...