I don't know the exact terminology for this, so excuse the wording. I'm looking to "customize" a predefined array to any given length(parameters being the actual size of the array). What I mean by this is, say I have an array of size 5000. I then, through some function, input the number 500. What this function does is take (5000 - Number_Input) indexes and declare them void, such that only 500 array indexes are "valid" for use.
What is done after this array of size "500" isn't really of concern, because all the other things I need to do with the actual array aren't an issue.
Is such a thing possible? Is there a better way to do this? If so, it would be absolutely fantastic if I could get a push in the right direction. I haven't written the code for this function yet because I really have no idea where to start after my initial prompt/scanf. I have not learned about pointers or dynamic memory allocation in my class yet.
//edit: looking over another homework thread it seems I misunderstood the rule on crossposting, thinking it only applied to various subforums here(like spamming a "HALP PLZ" in a Q/A, here, the C++ forum, etc). I have posted my question on another forum, Link is here. If you decide to lock this thread for that reason, I understand completely.