Use range based loop for output.
This commit is contained in:
parent
2465911659
commit
374a7ef9d9
@ -43,8 +43,8 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
cout << "Iteration: " << i << "\n\n";
|
cout << "Iteration: " << i << "\n\n";
|
||||||
|
|
||||||
for (int j = 0; j < field.size(); j++) {
|
for (auto & cell : field) {
|
||||||
cout << field[j] << "\n";
|
cout << cell << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "\n" << endl;
|
cout << "\n" << endl;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user