📄 cpp1.cpp
字号:
#include<stdio.h>
#include<stdlib.h>
//#include<process.h>
//#include<dos.h>
//#include<conio.h>
//#include<malloc.h>
//#include<string.h>
typedef struct studentnode
{int xuehao[8];
char name;
float yuwen;
float shuxue;
float yingyu;
int mingci;
float zongfen;
struct studentnode *next;
}linklist;
//void increase();
//void delet();
//void amend();
//void reserch();
void face();
void creat();
void main()
{printf("\n\n\n\n\n\n\n\n 是否更新该系统?\n");
printf(" 是,请按1 否,请按2\n\n");
printf("请选择:");
int i;
scanf("%D",&i);
switch(i)
{case 1:creat();
case 2:face();
}
}
void creat()
{system("cls");
linklist *head;
head=(linklist*)malloc(sizeof(linklist));
head->xuehao[8]=NULL;
head->name=NULL;
head->yuwen=NULL;
head->shuxue=NULL;
head->yingyu=NULL;
head->mingci=NULL;
head->zongfen=NULL;
head->next=NULL;
FILE *fp;
if((fp=fopen("stu_list","wb"))==NULL)
{printf("文件不能打开\n");
return;
}
if(fwrite(head,sizeof(linklist),1,fp)!=1)
printf("文件书写错误\n");
fclose(fp);
face();
}
void face()//菜单
{system("cls");
printf("\n\n\n\n\n\n*****************************欢迎进入学籍管理系统*******************************\n");
printf(" 查询请按1 增添请按2\n");
printf(" 删除请按3 修改请按4\n");
printf("\n********************************************************************************\n");
printf("请选择:");
//int i;
//scanf("%d",&i);
//switch(i)
//{//case 1:reserch():
//case 2:increase();
//case 3:delet();
//case 4:turn();
//}
printf("\n********************************************************************************");
}
//void increase()//增加
//{clrscr();
//}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -