Menu works?
This commit is contained in:
parent
68e7176d2e
commit
2e4efa7833
@ -53,15 +53,19 @@ void Aufg8Main() {
|
|||||||
std::cout << "==============" << std::endl;
|
std::cout << "==============" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteAllPointers(allSales);
|
std::string selectedRegion;
|
||||||
|
std::string selectedType;
|
||||||
|
int currentMenu = 0;
|
||||||
|
|
||||||
std::string* selectedRegion;
|
std::string* PselectedRegion = &selectedRegion;
|
||||||
std::string* selectedType;
|
std::string* PselectedType = &selectedType;
|
||||||
int* currentMenu;
|
int* PcurrentMenu = ¤tMenu;
|
||||||
|
|
||||||
MenuManager menu{currentMenu, selectedRegion, selectedType};
|
MenuManager menu{PcurrentMenu, PselectedRegion, PselectedType};
|
||||||
menu.MainInteraction();
|
menu.MainInteraction();
|
||||||
switch (*currentMenu) { // TODO Finish these
|
while (currentMenu) {
|
||||||
|
std::cout << "Deciding if youre allowed to quit" << (currentMenu) << std::endl;
|
||||||
|
switch (currentMenu) { // TODO Finish these
|
||||||
case 0:
|
case 0:
|
||||||
return;
|
return;
|
||||||
case 1:
|
case 1:
|
||||||
@ -71,7 +75,7 @@ void Aufg8Main() {
|
|||||||
// getSaleCount(*selectedType, *selectedRegion);
|
// getSaleCount(*selectedType, *selectedRegion);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
getMostPopularTypeIn(*selectedRegion, allSales);
|
getMostPopularTypeIn(selectedRegion, allSales);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
// getOnlineVsOfflineIn(*selectedRegion);
|
// getOnlineVsOfflineIn(*selectedRegion);
|
||||||
@ -79,4 +83,6 @@ void Aufg8Main() {
|
|||||||
default:
|
default:
|
||||||
std::cout << "You should not be able to reach this!";
|
std::cout << "You should not be able to reach this!";
|
||||||
}
|
}
|
||||||
|
menu.MainInteraction();
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user