Website Summary Files Commits Branches @commit @diff @stats
path: root / Week03 / Exercise01 / main.cpp
blob: a018dd557a84ec24f208c4f90a350c624ad95f35 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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;
}