You have to specify the number of elements, not the maximum index, to declare arrays in C++.
With this declaration
float values[1][1];
Only values[0][0] is avaliable.
values[0][0]
The declaration should be
float values[2][2];
1.4m articles
1.4m replys
5 comments
57.0k users