<div dir="ltr"><div dir="ltr">On Thu, 3 Dec 2020 at 23:15, Alexandre Torres Porres <<a href="mailto:porres@gmail.com">porres@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi, when compiling ELSE for camomille in windows, me and Esteban are getting some errors. Offending pieces of code are when trying to do things like<div><div><br></div><div><span style="color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(255,251,221)">    t_atom at[ac];</span></div></div></div></blockquote><div><br></div><div>If you want to maintain straight C compiler compatibility</div><div><br></div><div>        t_atom* at = (t_atom*)malloc(ac * sizeof(t_atom));</div><div><br></div><div>but you have to remember to free(at), &cet. You can avoid the free() if you HAVE_ALLOCA with</div><div><br></div><div><div>        t_atom* at = (t_atom*)alloca(ac * sizeof(t_atom));</div><div></div></div><div><br></div><div>if you want to do it the C++ way without a std::vector<t_atom></div><div><br></div><div>        t_atom* at = new t_atom[ac];</div><div><br></div><div>but again you will have to</div><div><br></div><div>        delete at;</div><div><br></div><div>For my own externals, I write them all in C++ and use STL. Making the change from the C-world allocation of PD to the C++ world is not so hard, but it does involve a tiny bit of trickery which I only justify through expediency.</div><div><br></div><div>- d</div></div></div>