The array arguments you declare are variable-length arrays and those are not allowed in C++. You have to solve in in other ways, like using templates, std::vector
or std::array
.
Remember that C and C++ are two very different languages. C++ may have been originally developed from C, and they share syntax for many things, but they are still different languages with different rules.