From 5624cd9b63bec13fc464a3d7820d703abd8de113 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 8 Mar 2026 19:54:32 +0200 Subject: feat(Week03): Add solution to first exercise --- Week03/Exercise01/main.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Week03/Exercise01/main.cpp (limited to 'Week03/Exercise01/main.cpp') 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 +#include +#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; +} -- cgit v1.3.1-23-gd82d