Structure alignment in C++
<pre><code>struct Vector 
{
   float x, y, z;
};

func(Vector *vectors) {...}

usage:
load float *coords = load(file);
func(coords);
</code></pre>

<p>I have a question about the alignment of structures in C++. I will pass a set of points to the function <code>func()</code>. Is is OK to do it in the way shown above, or is this relying on platform-dependent behavior? (it works at least with my current compiler) Can somebody recommend a good article on the topic?</p>

<p>Or, is it better to directly create a set of points while loading the data from the file?</p>

<p>Thanks</p>
