⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 复件 list.txt

📁 学生系统
💻 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 + -