why do i get a error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

why do i get a error

i get a (The value of parameter "y" declared at line 5 cannot be used as a constant) error when i run this code in visual studio. i get the same error for the "x" value https://code.sololearn.com/crrZePFFP2FK/?ref=app

12th Jun 2019, 12:57 PM
Cat Sauce
Cat Sauce - avatar
2 Answers
+ 1
Variable length arrays aren't supported in C++ you have to use constant values. In C they conform to C99 and are optional since C11.
12th Jun 2019, 1:18 PM
Cluck'n'Coder
Cluck'n'Coder - avatar
0
~ swim ~ then how should i do it?
12th Jun 2019, 3:46 PM
Cat Sauce
Cat Sauce - avatar