?? typedef.h
字號(hào):
//typedef.h
//定義結(jié)構(gòu)體和文件指針
#include "StdAfx.h"
#include <stdio.h>
#include <conio.h>
#include <malloc.h>
//#define DEBUG //調(diào)試控制語句
//定義結(jié)構(gòu)體
typedef struct place
{
int p_long; //長(zhǎng),橫坐標(biāo)
int p_breadth; //寬,縱坐標(biāo)
}place;
typedef struct user_data //定義user_data文件結(jié)構(gòu)體,存放用戶數(shù)據(jù)
{
char username[20]; //用戶名
char password[20]; //用戶密碼
float price; //停車單價(jià)
char language; //界面語言
place Dimension; //停車場(chǎng)大小
}user_data;
typedef struct park_car //定義park_car結(jié)構(gòu)體,存放車輛數(shù)據(jù)
{
char name[20]; //車主姓名
char number[10]; //車牌號(hào)碼
place parkplace; //停車位置
int ptime[6]; //存入時(shí)刻
int ltime[6]; //離開時(shí)刻
int time[6]; //停車時(shí)間
float price; //停車單價(jià)
float pay; //存車計(jì)費(fèi)
long tradenumber; //交易號(hào)
}park_car;
typedef struct Sqlist //定義Sqlist結(jié)構(gòu)體,處理順序表
{
park_car * buffer; //數(shù)據(jù)緩沖區(qū)
int datasize; //元素所占內(nèi)存
int length; //當(dāng)前元素個(gè)數(shù)
int maxsize; //最大空間
}Sqlist;
typedef void (* pPrintData)(void *);
//聲明全局變量
extern user_data user;
extern char ** p_language_print;
extern Sqlist * carlist;
extern char * log_time[30],* car_num[10];
extern FILE * fp_user;
extern FILE * fp_car;
extern FILE * fp_log;
extern FILE * fp_place;
extern char * Chinese[];
extern char * English[];
//界面函數(shù)聲明
void Out_hander_ch(); //登陸前標(biāo)題函數(shù)
void Out_hander_en();
void Out_hander_ce();
void In_hander_ch(); //登錄后標(biāo)題函數(shù)
void In_hander_en();
bool In_login(); //登陸函數(shù)
void In_help_ch(); //幫助菜單
void In_help_en();
void In_admin_ch(); //高級(jí)選項(xiàng)菜單
void In_admin_en();
//用戶登錄函數(shù)聲明
bool login(); //系統(tǒng)登錄
void starword(char *); //回顯星號(hào)輸入密碼
//日志函數(shù)聲明
bool open_log(); //打開日志文件
bool input_log(char[]); //存車日志
bool output_log(char[]);//取車日志
bool price_log(); //修改價(jià)格日志
bool password_log(); //修改密碼日志
bool backbdata_log(); //備份數(shù)據(jù)文件日志
bool backqdata_log(); //恢復(fù)數(shù)據(jù)文件日志
bool login_log(); //登入日志
bool logout_log(); //注銷日志
bool print_log(); //輸出日志
//一般功能函數(shù)聲明
bool fun_input(); //存入車輛
bool fun_output(); //取出車輛
bool fun_search(); //查找車輛
bool fun_state(); //查看停車場(chǎng)狀態(tài)
bool fun_admin(); //進(jìn)入高級(jí)菜單
void fun_quick(); //退出系統(tǒng)
//高級(jí)功能函數(shù)聲明
bool admin_setprice(); //重新設(shè)置停車價(jià)格
bool admin_modifypassword(); //修改密碼
bool admin_cardata(); //備份、恢復(fù)停車場(chǎng)數(shù)據(jù)文件
bool admin_userlog(); //用戶登錄日志
bool admin_setlanguage(); //修改語言
//時(shí)間處理函數(shù)聲明
void times_segment(int *,int *,int *); //時(shí)間長(zhǎng)度計(jì)算
int * now_time(void); //獲取當(dāng)前系統(tǒng)時(shí)間
void car_pay(int ); //計(jì)算停車費(fèi)用
//順序表處理函數(shù)聲明
Sqlist * InitList_Sq(int,int); //新建一個(gè)順序表
int InsertList_Sq(Sqlist *,int,park_car *); //向指定順序表插入數(shù)據(jù)
int DeleteList_Sq(Sqlist *,int); //從指定順序表刪除數(shù)據(jù)
void DestroyList_Sq(Sqlist *); //銷毀一個(gè)順序表
int Searchnumber_Sq(Sqlist *,char *);
bool InPush(Sqlist * ,int,int); //向順序表填充二維數(shù)組
bool IsFull(Sqlist *); //判斷是否為滿
bool IsEmpty(Sqlist *); //判斷是否為空
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -