C++: Data alignment and efficient use of memory (in both time and space)
<p>Cheers every!</p>

<p>I want to store some data in memory in a structure, or in an array. My problem is data alignment. I cant really use a 8 byte data next to a char since they will take up 16 bytes together.</p>

<p>Now I would live happy with a single 8 byte field, like a char and using the remaining 7 bytes to store other data.</p>

<p>How do I do that? What are the performance penalties to pay?
Thanks people.</p>
