[Solved] How to fix compiler error when try to initialise a std::array from a non const size [duplicate]
[ad_1] How can I edit my code to create a std::array from a size not known at compile time? You can’t. std::array is a fixed-sized array, it’s size must be a constant known at compile-time. To make a dynamic array whose size is not known until runtime, you must use new[] instead: int *items = … Read more