Statically allocate N number of containers?
Hello,
I want the user to be able to configure UI. There is configuration view (settings menu) which will add N number of containers to another view.
Currently there is no customization, only fixed number of containers are allocated.
parameterContainer parameterContainer1;
parameterContainer parameterContainer2;
parameterContainer parameterContainer3;
parameterContainer parameterContainer4;I want that user can setup N number of these to the view (up to 10 containers). I will also have 4 types of parameterContainerA, parameterContainerB etc. to select from, so I cannot allocate 10 of all of these.
How can I achieve such functionality?
I know I could use malloc like this:
addContainer(Type type)
{
malloc(container);
}But can I do such feature by allocating statically?
Thanks!