?? 復件 list.txt
字號:
#include <iostream.h> // cin 及 cout
#include <malloc.h> // 用到申請內存函數 malloc() 和釋放內存函數 free()
#include <string.h> // 字符串處理
#include <stdio.h> // 文件操作(讀文件)
#include <stdlib.h>
#define Y 1
#define N 0
struct worker
{
char name[20];
char sex[10];
int num;
char birthday[100];
char partment[40];
char workyear[10];
char E-mail[50];
char telphone[10];
char graduate[20];
char address[40];
char duty[20];
char in_time[20];
};
struct file
{
int Da;
char num[6];
char date_t[20];
char depart[20];
char duty[20];
char notice[50];
int leave_er;
int come_la;
int sick_le;
int affair_le;
int over_time;
int out;
int holiday;
};
typedef struct linknode
{
struct worker someone;
bool flag;
struct linknode* next;
}nodetype;
typedef struct linknode2
{
struct file somefile;
struct linknode2* next;
}nodetype2;
class filework
{
private:
nodetype2* head;
public:
linknode2* creat_list(int);
nodetype2* find_node(int);
nodetype2* ins_node(int);
nodetype2* load_file();
int latecome();
int earlyleave();
int sick();
int affair();
int overtime();
int evection();
filework();
};
class List
{
nodetype* head;
public:
List();
List::~List();
linknode* creatlist(int); //創建鏈表
int listlen(); //返回鏈表長度
nodetype* findnode(int); //通過查找序號返回節點的指針
nodetype* find(char c[]); //通過查找姓名返回節點的指針
int find2(char c[]); //通過查找姓名返回節點的序號
nodetype* insnode(int); //插入節點
void delnode(int); //刪除節點
nodetype* load(); //初始化:從外部讀入數據
void readstr(FILE *f,char *string); //讀行函數
bool check(char *a, char *b); //對比兩個字符串是否相等
void help(); //顯示幫助菜單
void editworker(nodetype*); //編輯個人說明
void dispname(); //顯示所有姓名
void dispnode(nodetype* p); //顯示一個職工的所有信息
void dispworker(nodetype*); //顯示一個職工的個人說明
};
class date_time
{
public:
viod printtime();
viod printdate();
bool check_time();
bool check_date();
int get_time();
int get_date();
viod set_time();
int add_date();
private:
int YEA,MON,DAT,H,M,S;
int am_worktime,pm_worktime;
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -