OK I have a nagging question that I need to put to rest right away, or else I am going to go amok.
In Visual Basic you can declare an array without knowing its size, and then redim the array again once the array size is known.
Now I can declare an array of 1000 elements, but that is not elegant, and a total waste.
I want to do this:
If the user provides any command line arguments for main, then I can test the length of the args array and that would give me the size of my array.
But if the user does not provide any command line arguments, then I will ask the user to enter numbers using a while loop, that would go on until the user enters -1 and that would be the value that would stop the while loop. In this case, I will not know the EXACT number of entries the user will want, and thus I can not declare my array.
What would be the most appropriate and elegant solution for this?
Thanks for any help.