91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 6KB
    文件類型: .cpp
    金幣: 1
    下載: 0 次
    發布日期: 2021-06-07
  • 語言: C/C++
  • 標簽:

資源簡介

支持學生信息的錄入,刪除,修改,按姓氏模糊查找,姓名/學號查詢,按時間查詢,并且將信息寫入到本地文件

資源截圖

代碼片段和文件信息

#include
#include
#include
#define?met(a)?memset(a0sizeof(a))
#define?fup(ianb)?for(int?i=a;i#define?fow(janb)?for(int?j=a;j>0;j-=b)
#define?MOD(x)?(x)%mod
using?namespace?std;
const?int?maxn?=?2*1e4;
const?int?mod=1e9+7;?
int?Node_len=1;
int?D?=?0;
struct?Node?{
char?Name[25];
char?Snum[25];
char?Location[40];
char?Time[30];
int?flag;
}Student[maxn];
void?Init();
void?Add();
void?Del();
void?Pref();
void?Query_Fname();
void?Query_Snum();
void?Query_Time();
void?Close();
void?Sign();
int?main(int?argc?const?char?*?argv[])?{
Init();
Sign();
int?Chose;
while?(cout<<“選擇操作:“&&cin?>>?Chose)?{
if?(Chose?==?0)break;
else?if?(Chose?==?1)Add();
else?if?(Chose?==?2)Del();
else?if?(Chose?==?3)Pref();
else?if?(Chose?==?4)Query_Fname();
else?if?(Chose?==?5)Query_Snum();
else?if?(Chose?==?6)Query_Time();
else?cout?< }
Close();
return?0;
}
?void?fileEmpty(const?char?fileName[])
{
fstream?file(fileName?ios::out);
return;
}
?void?Init()?{
?FILE*?fp;
?int?k=1;
?fp?=?fopen(“E:/Len.dll“?“a+“);
?Node_len?=?getw(fp);
?if?(Node_len?<=?0)Node_len?=?1;
?fclose(fp);
?fp?=?fopen(“E:/Student.dll“?“a+“);
?for?(int?i?=?1;?i?
?}
?void?Close()?{
?fileEmpty(“E:/Len.dll“);
?fileEmpty(“E:/Student.dll“);
?FILE*?fp;
?fp=?fopen(“E:/Len.dll“?“a+“);
?putw(Node_len?fp);
?fclose(fp);
?fp?=?fopen(“E:/Student.dll“?“a+“);
?for?(int?i?=?1;?i? ?if?(Student[i].flag)continue;
?else?fwrite(&Student[i]?sizeof(Node)?1?fp);
?fclose(fp);
?}
void?Add()?{
cout?< scanf(“%s“?Student[Node_len].Name);
scanf(“%s“?Student[Node_len].Snum);
scanf(“%s“?Student[Node_len].Location);
scanf(“%s“?Student[Node_len++].Time);
}
void?Del()?{
int?ai;
cout?< cin?>>?a;
if?(a?>=?Node_len)cout?< for?(i?=?1;?i? if?(Student[i].flag?==1)continue;
if?(a?==?1)break;
a--;
}
Student[i].flag?=?1;
}
void?Pref()?{
int?a?i;
cout?< cin?>>?a;
if?(a?>=?Node_len)cout?< for?(i?=?1;?i? if?(Student[i].flag?==1)continue;
if?(a?==?1)break;
a--;
}
int?ch;
cout?< cin?>>?ch;
if?(ch?==?1)cin?>>?Student[i].Name;
else?if?(ch?==?2)cin?>>?Student[i].Snum;
else?if?(ch?==?3)cin?>>?Student[i].Location;
else?if?(ch?==?4)cin?>>?Student[i].Time;
else?cout?

評論

共有 條評論