1

test ranged based loops in demos

This commit is contained in:
2022-07-17 21:41:12 +02:00
parent 132eb13431
commit 60b02a078b
2 changed files with 14 additions and 0 deletions

View File

@ -85,6 +85,13 @@ void ArrayListDemo::run() {
this->list.print(kout);
// ============================================================
kout << "Range based for support" << endl;
for (int i : this->list) {
kout << "List contains element: " << dec << i << endl;
}
kout.unlock();
scheduler.exit();
}

View File

@ -85,6 +85,13 @@ void LinkedListDemo::run() {
this->list.print(kout);
// ============================================================
kout << "Range based for support" << endl;
for (int i : this->list) {
kout << "List contains element: " << dec << i << endl;
}
kout.unlock();
scheduler.exit();
}