Is it possible to allow the user to enter the size of an array with a keyboard?
I know that arrays can\'t change size. The only solution I could think of is this:
Variable Length Arrays are not approved by C++ standard. C++ Standard mandates that the size of an array must be an compile time constant.
You can use VLA's through compiler extension provided in gcc but note the your code is not portable if you do so.
Standard approved way of doing this is to use std::vector.