sba/main.c
2023-07-18 12:37:06 +08:00

59 lines
1.2 KiB
C

//include std lib if they havent been included
#ifndef STD_LIB_H
#define STD_LIB_H
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<stdbool.h>
#include<math.h>
#include<time.h>
#include<ctype.h>
#include <stddef.h>
#endif
#ifndef CUSTOM_H
#define CUSTOM_H
#include "database.h"
#endif // !CUSTOM_H
#include "normal_user.h"
#include "admin_user.h"
#ifndef Utils
#define Utils
#include "utils.h"
#endif // !Utils
int main(){
bool check;
do{
system("cls");
//print welcome message
//prompt weather user is admin or normal user
//then redirect them to the corisponding menu
char * Items[] = {
"Admin",
"Normal User"
};
int choice = choices_selecter(Items,2,"><Welcome to the Student Union POS system><\n");
switch (choice)
{
case 1://admin
admin_menu();//refers to admin_user.h
check = true;
break;
case 2://normal user
normal_menu();//refers to normal_user.h
check = true;
break;
default://Exit
check = false;
break;
}
fflush(stdin);
} while (check);
return 0;
}