What I\'m trying to do right now is to create an array with a length that is defined by a variable. However, when I put the variable in the array length, it gives me a \"Va
You cannot have variable length arrays(VLA) in standard C++.
Variable length arrays are not allowed by the C++ Standard. In C++ the length of the array needs to be a compile time constant. Some compilers do support VLA as a compiler extension, but using them makes your code non-portable across other compilers.
You can use, std::vector instead of an VLA.