資源簡介
以前自己寫的餐單管理系統,用C寫的,需要的可以借鑒一下
代碼片段和文件信息
#include?
#include?
#include?
#include?
#include?
#define?N?sizeof(user)?
#define?M?sizeof(table)?
#define?T?sizeof(order)?
#define?S?sizeof(menu)?
typedef?struct?User{
char?username[12];//賬號?
char?password[18];//密碼
int?vip;//1為會員??0不是
int?adm;//administrator同上
//或將以上的采用數據域的方式存儲?
struct?User*?next;?
}user;?//注意初始化?可以寫一個初始化函數??借鑒7月9號的筆記中的“初始化”?
typedef?struct?Menu{
int?num;//1~10為熱菜??11~20為冷菜??21~25為飲料?
char?name[20];
int?price;
struct?Menu*?next;?
}menu;
typedef?struct?Table{
int?number;
int?is_blank;
int?peoplenum;
struct?Order*?ordert;//接該桌的訂單的頭結點?
int?price;//該桌的總價?
struct?Table*?next;?
}table;?
typedef?struct?Order{
int?number;//菜的編號
char?name[20];
int?copies;//菜的份數
int?
評論
共有 條評論