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];
2.1m questions
2.1m answers
60 comments
57.0k users