#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<io.h>
#include<conio.h>
#include<windows.h>
//#include"got_account_us_num.h"
//#include"got_account_ad_num.h"
//#define Password_1 123456
const char *Password_1="123456"; //用户
const char *Password_2="456789"; //管理员
const char *type_us="User";
const char *type_ad="Administrator";
void got_account_id();
void View_1();
void password(char *type); //登陆密码
int sale();
int print();
void choise__1();
void print_file(); //输出文件信息
int delet(); //删除数据
int count;
int delet_file(); //删除文件
struct stu{
int id;
char name[10];
char sex[3];
struct stu *next;
struct stu *left,*right;
}*phead,*pnew,*pend,*ptemp,*ppte;
struct stu_2
{
int number;
int id;
char name[10];
char sex[3];
};
struct file{
char file_name[20];
}name_1;
struct account_file{
char account_name[20];
char account_password[6];
char account_phone_number[11];
}account;
void create() //创建链表
{
char choise_1;
setvbuf(stdout,NULL,_IONBF,0);
system("cls");
count=0;
pnew=(struct stu*)malloc(sizeof(struct stu));
printf("请你输入学生信息(\"结束\"结束输入)\n");
printf("姓名 学号 性别\n");
scanf("%s %d %s",pnew->name,&pnew->id,pnew->sex);
while(strcmp(pnew->name,"结束"))
{
count++;
if(count==1)
{
pnew->next=NULL;
phead=pnew;
ptemp=pnew;
}
else
{
pnew->next=NULL;
ptemp->next=pnew;
ptemp=pnew;
}
pnew=(struct stu*)malloc(sizeof(struct stu));
scanf("%s",pnew->name);
if(!strcmp(pnew->name,"结束")) break;
else
{
scanf("%d %s",&pnew->id,pnew->sex);
}
}
printf("输入信息成功\n");
// system("pause");0
free(pnew);
do
{
// system("cls");
printf("*************欢迎你使用学生信息管理系统*************\n");
printf("----------------------------------------------------\n");
printf("[M]保存信息\t[N]删除信息\t[F]嘻嘻嘻\n");
printf("[A]返回主界面\t[S]查询信息\t[T]哈哈\n");
printf("[Q]查询文件名\t[W]删除文件\t[R]退出\n");
printf("你的选择是- ");
fflush(stdin); //清空缓冲区
scanf("%c",&choise_1);
switch(choise_1)
{
case 'M':