[PD] free C lesson

Jonathan Wilkes jancsika at yahoo.com
Mon Aug 17 16:36:51 CEST 2015


Hi list,Wondering if someone will give me a free lesson in C programming.
In g_traversal.c, there's some code to retrieve a float from a t_word* vec.  It looks like this:
*(t_float *)(((char *)vec) + onset));
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...)
Thanks,Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150817/944d4292/attachment.html>


More information about the Pd-list mailing list