C++: Aligned byte fields not possible in classes?

Hi,
if I want to define a 4byte aligned char array in C, then I typically would declare:

__align(4) char acBuf[20];

In C++, inside a class, this unfortunately fails (Error #328: invalid storage class for a class member).

Is there any way to enforce alignment for C++ class members?

Parents Reply Children
No data
More questions in this forum