Website Summary Files Commits Branches @commit @diff @stats
path: root / Week03 / Exercise01 / User.h
blob: 480251653373aee92d1944a9be39c5662f561215 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef _USER
#define _USER

struct User {
	char name[256];
	char password[256];
	bool isAdmin;
};

struct UserArray {
	User* users;
	unsigned count;
	unsigned allocated;

	void add(const User& user);
	User* find(char* username);
};

UserArray newUserArray(unsigned allocatedSize);
void deleteUserArray(UserArray& ua);

#endif