Q:

Under the new standard we can simplify the previous loop by using a range for

0

Under the new standard we can simplify the previous loop by using a range for.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

size_t cnt = 0;
for (auto &row : ia) // for every element in the outer array
for (auto &col : row) { // for every element in the inner array
col = cnt; // give this element the next value
++cnt; // increment cnt
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now