commit
bf73495382
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,88 @@
|
||||
# Microsoft Developer Studio Project File - Name="shiyan99" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=shiyan99 - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "shiyan99.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "shiyan99.mak" CFG="shiyan99 - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "shiyan99 - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "shiyan99 - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "shiyan99 - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x804 /d "NDEBUG"
|
||||
# ADD RSC /l 0x804 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "shiyan99 - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x804 /d "_DEBUG"
|
||||
# ADD RSC /l 0x804 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "shiyan99 - Win32 Release"
|
||||
# Name "shiyan99 - Win32 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\shiyan99.cpp
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# 警告: 不能编辑或删除该工作区文件!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "shiyan99"=".\shiyan99.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,34 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
<h1>Build Log</h1>
|
||||
<h3>
|
||||
--------------------Configuration: shiyan99 - Win32 Debug--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\Users\PC-LEN~1\AppData\Local\Temp\RSP171.tmp" with contents
|
||||
[
|
||||
/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/shiyan99.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
|
||||
"C:\Users\pc-lenovo\Desktop\syan\shiyan99.cpp"
|
||||
]
|
||||
Creating command line "cl.exe @"C:\Users\PC-LEN~1\AppData\Local\Temp\RSP171.tmp""
|
||||
Creating temporary file "C:\Users\PC-LEN~1\AppData\Local\Temp\RSP182.tmp" with contents
|
||||
[
|
||||
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/shiyan99.pdb" /debug /machine:I386 /out:"Debug/shiyan99.exe" /pdbtype:sept
|
||||
".\Debug\shiyan99.obj"
|
||||
]
|
||||
Creating command line "link.exe @"C:\Users\PC-LEN~1\AppData\Local\Temp\RSP182.tmp""
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
shiyan99.cpp
|
||||
C:\Users\pc-lenovo\Desktop\syan\shiyan99.cpp(179) : warning C4101: 'i' : unreferenced local variable
|
||||
C:\Users\pc-lenovo\Desktop\syan\shiyan99.cpp(306) : warning C4508: 'main' : function should return a value; 'void' return type assumed
|
||||
Linking...
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
shiyan99.exe - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,110 @@
|
||||
typedef struct //结构体
|
||||
{
|
||||
char xh[13];
|
||||
char name[20];
|
||||
char xb[4];
|
||||
char year[4];
|
||||
char bz[10000];
|
||||
}Student;
|
||||
|
||||
void stdudent_cx()
|
||||
{
|
||||
|
||||
FILE *fp;
|
||||
int n,flag=0;
|
||||
char target[20],s[3]={0};
|
||||
Student Stu;
|
||||
int i,dot=0;
|
||||
fp=fopen("student.txt","a+");
|
||||
if(fp==NULL)
|
||||
{
|
||||
printf("无法打开文件\n");
|
||||
}
|
||||
while(dot==0)
|
||||
{
|
||||
printf(" ***请输入查询方式***");
|
||||
printf(" ***0.退出***\n");
|
||||
printf(" ***1.按学号***\n");
|
||||
printf(" ***2.按姓名***\n");
|
||||
printf(" ***3.按性别***\n");
|
||||
printf(" ***4.按年龄***\n");
|
||||
scanf("%d",&n);
|
||||
while(n!=0)
|
||||
{
|
||||
if(n==1)
|
||||
{
|
||||
printf("退出按0\n");printf("请输入学号\n");
|
||||
gets(target);
|
||||
}
|
||||
else if(n==2)
|
||||
{
|
||||
printf("退出按0\n");printf("请输入姓名\n");
|
||||
gets(target);
|
||||
}
|
||||
else if(n==3)
|
||||
{
|
||||
printf("退出按0\n");printf("请输入性别\n");
|
||||
gets(target);
|
||||
}
|
||||
else if(n==4)
|
||||
{
|
||||
printf("退出按0\n");printf("请输入年龄\n");
|
||||
gets(target);
|
||||
}
|
||||
gets(target);
|
||||
if(strcmp(target,s)!=0)
|
||||
{
|
||||
while(!feof(fp))
|
||||
{
|
||||
fscanf(fp,"%s %s %s %s %s",Stu.xh,Stu.name,Stu.xb,Stu.year,Stu.bz);
|
||||
if(strcmp(target,Stu.xh)==0||strcmp(target,Stu.name)==0||strcmp(target,Stu.year)==0||strcmp(target,Stu.xb)==0)
|
||||
{
|
||||
printf("%s %s %s %s %s\n",Stu.xh,Stu.name,Stu.xb,Stu.year,Stu.bz);
|
||||
flag=1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dot=1;flag=1;n=0;
|
||||
}
|
||||
if(flag==0)
|
||||
{
|
||||
printf("no find\n");
|
||||
}
|
||||
n=0;
|
||||
}
|
||||
if(n==0)
|
||||
{
|
||||
dot=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void stdudent_sc()
|
||||
{
|
||||
FILE *fp;
|
||||
int dot=1;
|
||||
char target[20];
|
||||
Student Stu;
|
||||
fp=fopen("student.txt","a+");
|
||||
while(dot==1)
|
||||
{
|
||||
printf("输入学号,退出按确定");
|
||||
scanf("%s",target);
|
||||
FILE *out;out=fopen("back.txt","w"); /*out是充当临时文件作用*/
|
||||
while(!feof(fp))
|
||||
{
|
||||
if(strcmp(target,Stu.xh)!=0)
|
||||
{
|
||||
fprintf(out,"%s %s %s %s %s",Stu.xh,Stu.name,Stu.xb,Stu.year,Stu.bz);
|
||||
fprintf(out,"\n");
|
||||
}
|
||||
fscanf(fp,"%s %s %s %s %s",Stu.xh,Stu.name,Stu.xb,Stu.year,Stu.bz);
|
||||
}
|
||||
fclose(out);
|
||||
dot=0; fclose(fp);
|
||||
}
|
||||
}
|
Binary file not shown.
@ -0,0 +1,7 @@
|
||||
11405200101 zhangsan ÄÐ 18 no
|
||||
11405200102 lisi Å® 29 no
|
||||
11405200104 diaochan Å® 15 no
|
||||
11405200105 xishi ÄÐ 18 no
|
||||
11405200106 guanyu Å® 17 no
|
||||
11405200109 ÀîÊÀ½Ü ÄÐ 16 no
|
||||
11405200110 ÍõÅô ÄÐ 15 no
|
Loading…
Reference in new issue