I want to define an array globally, but I don't know the size of the array initially. I have a function that calculates the required array size in the program, I want to set the size of it after I have executed this function.
How can you define an array globally without specifying it's size at the same time? Is this is even possible? If not, what else can I do apart from creating the array locally and passing it to every function that needs it?
(I'm using straight C btw)
Thanks for any help.
How can you define an array globally without specifying it's size at the same time? Is this is even possible? If not, what else can I do apart from creating the array locally and passing it to every function that needs it?
(I'm using straight C btw)
Thanks for any help.