資源簡介
以前自己寫的餐單管理系統(tǒng),用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];//賬號(hào)?
char?password[18];//密碼
int?vip;//1為會(huì)員??0不是
int?adm;//administrator同上
//或?qū)⒁陨系牟捎脭?shù)據(jù)域的方式存儲(chǔ)?
struct?User*?next;?
}user;?//注意初始化?可以寫一個(gè)初始化函數(shù)??借鑒7月9號(hào)的筆記中的“初始化”?
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;//接該桌的訂單的頭結(jié)點(diǎn)?
int?price;//該桌的總價(jià)?
struct?Table*?next;?
}table;?
typedef?struct?Order{
int?number;//菜的編號(hào)
char?name[20];
int?copies;//菜的份數(shù)
int?
評論
共有 條評論