I want to use a couple of interger and float arrays in C++ for a project but the code would compile and not run. When I inserted checkpoints in the code, I found out that issue is with the blocks of array declaration. Please is there anything wrong with my code.
int main(int argc, char *argv[]) {
int row = 0, col = 0, num_rows = 512, num_cols = 512, quant;
int x[num_rows][num_cols], quantIndices[num_rows][num_cols];
float diffHat[num_rows][num_cols], xHat[num_rows][num_cols], xTilda[num_rows][num_cols],
diff[num_rows][num_cols];
//some more codes
for(row = 0; row < num_rows; ++row){
for (col = 0; col < num_cols; ++col){
//more codes that will involve all the arrays
}
}
return 0
}