Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Struct member alignment when deriving a class from an MFC class

$
0
0

Is it possible to change the struct member alignment of a class which derives from an MFC class ? How is this resolved by the compiler, since the base class's member variables are aligned differently from the member variables of the derived class ?

Some legacy code with which I am dealing derives classes from CObject but changes the struct member alignment of such a class to a a 1 byte packing level. This looks dangerous to me, but I wanted to check here to see if anybody knows if it is truly so.



Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>