I'm not sure what the technical term for this is, so that's why I left the title as general as possible. So, I'm trying to write a program(in C) that will basically allow me to "customize" the size of an already defined array. This would be something done at the beginning of the program so all further calculations would be done with this special array.
The general idea is this:
An array is any size, say 5000 indexes. If I input a 500 via some function, then my array will have 4500 null spaces hence forth and 500 valid spaces with which to plug numbers into later in the program.
Is such a thing possible? If not that exact thing, then perhaps something similar? Or something different altogether that would still allow me to "customize" how many values are actually valid in an array based on what's entered?
Thanks in advance if I get any answers. I'd appreciate it if I didn't just get "here ya go!" code snippets, as this is an assignment that I'd like to try and mostly work out for myself. A friendly nudge in the right direction wouldn't hurt, though:icon_cheesygrin:
Just to clarify, as it may not have been made clear, but there aren't any other parts of my code that I'm having issues with. Using a pre-defined array of any size and doing various comparison tests/what have you isn't an issue.