From 5c491145348bafe0c47cc7cc4ea3f049f30bdd90 Mon Sep 17 00:00:00 2001 From: Samuel Oberhofer Date: Mon, 23 May 2022 21:52:36 +0200 Subject: [PATCH] Break after adding 1 ware --- Uebung 1/Sortiment.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Uebung 1/Sortiment.cpp b/Uebung 1/Sortiment.cpp index 1f7ce57..e3d165d 100644 --- a/Uebung 1/Sortiment.cpp +++ b/Uebung 1/Sortiment.cpp @@ -6,6 +6,7 @@ void Sortiment::addWare(Ware *ware) { for (int i = 0; i < 10; i++) { if (this->waren[i] == nullptr) { this->waren[i] = ware; + break; } } }