I have some 2D arrays of a static size:
double quickStats[NUM_REPETITIONS][NUM_TRIALS];
double mergeStats[NUM_REPETITIONS][NUM_TRIALS];
double bstStats[NUM_REPETITIONS][NUM_TRIALS];
Later, I want a reference to one of them:
double stats[NUM_REPETITIONS][NUM_TRIALS];
if(i == 0) {
stats = quickStats;
}
else if(i == 1) {
stats = mergeStats;
}
else if(i == 2) {
stats = bstStats;
}
However, this does not work.
What can I do to do what I am trying to do without nested for loops to manually copy each element into the reference array?
I just need to read from stats, it is to avoid redundant code.
Thanks