Suppose, i've declared a string array. At runtime, i get user's choice and initialize the array size with user given choice.
During run-time user entered 5 and my array size is now 5. Now if a specific condition occur, i want to resize my array. Forexample, a condition occured, and i needed to add 5 more indexes in the array. Means, my array should be of size 10 now without any data loss. I know how to handle the data without loosing it but don't know how to re-initialize my same array to get size 10. I only want to use array and nothing else (i.e. arraylist or vector).
And is this the right solution (Described below);
i'll make a function which will initialize my array with user given size. As soon as user enters, array is declared and soon after as i need to extend my array size, i'll call the function. Before that, i'll store whole data in temporary array.
So, if there are other solutions (efficient one), kindly let me know.