diff options
1 files changed, 25 insertions, 0 deletions
| -rw-r--r-- | Week03/Exercise01/main.cpp | 25 |
diff --git a/Week03/Exercise01/main.cpp b/Week03/Exercise01/main.cpp new file mode 100644 index 0000000..a018dd5 --- /dev/null +++ b/Week03/Exercise01/main.cpp @@ -0,0 +1,25 @@ +#include <iostream> +#include <cstring> +#include "Shop.h" + +int main() { + Shop shop = newShop(); + + User admin; + strcpy(admin.name, "admin"); + strcpy(admin.password, "admin"); + admin.isAdmin = true; + + shop.users.add(admin); + + char command; + while (true) { + std::cin >> command; + std::cin.ignore(); + shop.runCommand(command); + } + + deleteShop(shop); + + return 0; +} |
