I know the code for this kind of output(It is in the documentation)
How many numbers would you like to type? 5
Enter number : 75
Enter number : 436
Enter number : 1067
Enter number : 8
Enter number : 32
You have entered: 75, 436, 1067, 8, 32
My question is how to take the input numbers and store them in dynamic array with out specifying how many of them? ie., excluding the first step in the output above.
I don't need code i need the idea. Thank you for your time.
Regards.
The simplest way would be to use a vector<int>;
You create a loop and get the number inside a temporary int. you push back the int inside your vector<int> . You also need to do a check for bad input and for what value sould be the exit value.