<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1439821611427_3518">Hi list,</div><div id="yui_3_16_0_1_1439821611427_3519">Wondering if someone will give me a free lesson in C programming.</div><div id="yui_3_16_0_1_1439821611427_3520"><br></div><div dir="ltr" id="yui_3_16_0_1_1439821611427_3521">In g_traversal.c, there's some code to retrieve a float from a t_word* vec.  It looks like this:</div><div id="yui_3_16_0_1_1439821611427_3594" dir="ltr"><br></div><div dir="ltr" id="yui_3_16_0_1_1439821611427_3450">*(t_float *)(((char *)vec) + onset));</div><div id="yui_3_16_0_1_1439821611427_3706" dir="ltr"><br></div><div id="yui_3_16_0_1_1439821611427_3679" dir="ltr">Why does vec need to be cast to char*?  t_word has to be as big as the largest member of the union, and the largest member has to be the same size as char*, right?  (Otherwise we'd have big problems...)</div><div id="yui_3_16_0_1_1439821611427_3736" dir="ltr"><br></div><div id="yui_3_16_0_1_1439821611427_3737" dir="ltr">Thanks,</div><div id="yui_3_16_0_1_1439821611427_3750" dir="ltr">Jonathan<br></div></div></body></html>