I need to declare an array globally, because I want all methods to be able to access it in the main.c program. However, if I declare it in main.h, I will have to give it a size at declaration time – the problem is, I don’t know the size until InitializeMemory(…) method is called, which takes user input to be the size of the array.
Share
Create it like
int *ptr;globally (let say it’s integer);then in your function;