diff options
feat(Week03): Add solution to first exercise
1 files changed, 22 insertions, 0 deletions
| -rw-r--r-- | Week03/Exercise01/User.h | 22 |
diff --git a/Week03/Exercise01/User.h b/Week03/Exercise01/User.h new file mode 100644 index 0000000..4802516 --- /dev/null +++ b/Week03/Exercise01/User.h @@ -0,0 +1,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 |
