diff --git a/Uebung 1/Algorithms.h b/Uebung 1/Algorithms.h index 0f06185..d7b610e 100644 --- a/Uebung 1/Algorithms.h +++ b/Uebung 1/Algorithms.h @@ -1,10 +1,11 @@ #pragma once #include "Sortiment.h" +#include "Ware.h" #include void bubbleSort(Ware *waren[10]) { for (int i = 0; i < 10; i++) { - if (waren[i] > waren[i + 1]) { + if (waren[i]->getGewicht() > waren[i + 1]->getGewicht()) { std::swap(waren[i], waren[i + 1]); } }