Well, you can! In CodeBlocks, you can use a variable for an array size. But unfortunately, this is not the standard of C++.