[PD-dev] how to dinamically allocate t_atom & t_float size?

Alexandre Torres Porres porres at gmail.com
Thu Dec 3 22:25:27 CET 2020


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

t_atom at[ac];

and

t_float temp[n];

from stackflow
<https://stackoverflow.com/questions/9881777/why-do-i-get-cannot-allocate-an-array-of-constant-size-0>
we see "*You cannot allocate an array of unknown size with automatic
storage duration in C++. If you want a variable sized array then you need
to dynamically allocate it (or, better yet; just use a vector).*"

Thing is we don't know how to proceed here and are looking for hints, maybe
showing how other objects in Pd deal with this.
BTW, there's an issue <https://github.com/porres/pd-else/issues/881> on
ELSE's repository.

Thanks
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20201203/f936cc8f/attachment.html>


More information about the Pd-dev mailing list