commit 40e3c015827ef9e4f7f32bd4220862fa38e7b6e5 Author: 1757927326@qq.com <1757927326@qq.com> Date: Fri Jan 11 22:57:41 2019 +0800 first diff --git a/LZT/Debug/LZT.pch b/LZT/Debug/LZT.pch new file mode 100644 index 0000000..470786c Binary files /dev/null and b/LZT/Debug/LZT.pch differ diff --git a/LZT/Debug/vc60.idb b/LZT/Debug/vc60.idb new file mode 100644 index 0000000..df57a05 Binary files /dev/null and b/LZT/Debug/vc60.idb differ diff --git a/LZT/Debug/vc60.pdb b/LZT/Debug/vc60.pdb new file mode 100644 index 0000000..b6962d0 Binary files /dev/null and b/LZT/Debug/vc60.pdb differ diff --git a/LZT/LZT.dsp b/LZT/LZT.dsp new file mode 100644 index 0000000..9b195d3 --- /dev/null +++ b/LZT/LZT.dsp @@ -0,0 +1,96 @@ +# Microsoft Developer Studio Project File - Name="LZT" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=LZT - 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 "LZT.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 "LZT.mak" CFG="LZT - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "LZT - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "LZT - 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)" == "LZT - 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 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 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)" == "LZT - 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 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 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 "LZT - Win32 Release" +# Name "LZT - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/LZT/LZT.dsw b/LZT/LZT.dsw new file mode 100644 index 0000000..6c5138c --- /dev/null +++ b/LZT/LZT.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "LZT"=".\LZT.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/LZT/LZT.ncb b/LZT/LZT.ncb new file mode 100644 index 0000000..94001f5 Binary files /dev/null and b/LZT/LZT.ncb differ diff --git a/LZT/LZT.plg b/LZT/LZT.plg new file mode 100644 index 0000000..33e4690 --- /dev/null +++ b/LZT/LZT.plg @@ -0,0 +1,65 @@ + + +
+

Build Log

+

+--------------------Configuration: LZT - Win32 Debug-------------------- +

+

Command Lines

+Creating temporary file "C:\Users\279800~1\AppData\Local\Temp\RSPCFE1.tmp" with contents +[ +/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/LZT.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c +"E:\信息库\LZT\h.c" +] +Creating command line "cl.exe @C:\Users\279800~1\AppData\Local\Temp\RSPCFE1.tmp" +

Output Window

+Compiling... +h.c +E:\信息库\LZT\h.c(102) : error C2143: syntax error : missing ';' before 'if' +E:\信息库\LZT\h.c(102) : error C2143: syntax error : missing ')' before 'if' +E:\信息库\LZT\h.c(130) : error C2143: syntax error : missing ';' before 'if' +E:\信息库\LZT\h.c(130) : error C2143: syntax error : missing ')' before 'if' +E:\信息库\LZT\h.c(146) : error C2143: syntax error : missing ';' before 'if' +E:\信息库\LZT\h.c(146) : error C2143: syntax error : missing ')' before 'if' +E:\信息库\LZT\h.c(159) : error C2143: syntax error : missing ';' before '{' +E:\信息库\LZT\h.c(159) : error C2143: syntax error : missing ')' before '{' +E:\信息库\LZT\h.c(161) : error C2143: syntax error : missing ';' before 'if' +E:\信息库\LZT\h.c(161) : error C2143: syntax error : missing ')' before 'if' +E:\信息库\LZT\h.c(161) : error C2039: 'sum' : is not a member of 'student' + E:\信息库\LZT\h.c(15) : see declaration of 'student' +E:\信息库\LZT\h.c(162) : error C2143: syntax error : missing ')' before '{' +E:\信息库\LZT\h.c(168) : error C2039: 'english' : is not a member of 'student' + E:\信息库\LZT\h.c(15) : see declaration of 'student' +E:\信息库\LZT\h.c(168) : error C2039: 'math' : is not a member of 'student' + E:\信息库\LZT\h.c(15) : see declaration of 'student' +E:\信息库\LZT\h.c(168) : error C2039: 'chinese' : is not a member of 'student' + E:\信息库\LZT\h.c(15) : see declaration of 'student' +E:\信息库\LZT\h.c(168) : error C2039: 'aver' : is not a member of 'student' + E:\信息库\LZT\h.c(15) : see declaration of 'student' +E:\信息库\LZT\h.c(168) : error C2039: 'sum' : is not a member of 'student' + E:\信息库\LZT\h.c(15) : see declaration of 'student' +E:\信息库\LZT\h.c(189) : error C2143: syntax error : missing ';' before 'if' +E:\信息库\LZT\h.c(189) : error C2143: syntax error : missing ')' before 'if' +E:\信息库\LZT\h.c(200) : error C2146: syntax error : missing ';' before identifier 'stu' +E:\信息库\LZT\h.c(200) : error C2143: syntax error : missing ')' before ';' +E:\信息库\LZT\h.c(206) : error C2146: syntax error : missing ';' before identifier 'getch' +E:\信息库\LZT\h.c(249) : error C2143: syntax error : missing ';' before 'if' +E:\信息库\LZT\h.c(249) : error C2143: syntax error : missing ')' before 'if' +E:\信息库\LZT\h.c(249) : error C2065: 'name' : undeclared identifier +E:\信息库\LZT\h.c(249) : warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int ' +E:\信息库\LZT\h.c(249) : warning C4024: 'strcmp' : different types for formal and actual parameter 2 +E:\信息库\LZT\h.c(261) : error C2065: 'a' : undeclared identifier +E:\信息库\LZT\h.c(269) : error C2146: syntax error : missing ';' before identifier 'stu' +E:\信息库\LZT\h.c(269) : error C2143: syntax error : missing ')' before ';' +E:\信息库\LZT\h.c(291) : error C2084: function 'int __cdecl openl()' already has a body +E:\信息库\LZT\h.c(319) : error C2084: function 'void __cdecl see()' already has a body +E:\信息库\LZT\h.c(345) : fatal error C1004: unexpected end of file found +Error executing cl.exe. + + + +

Results

+h.obj - 31 error(s), 2 warning(s) +
+ + diff --git a/LZT/h.c b/LZT/h.c new file mode 100644 index 0000000..3eca26a --- /dev/null +++ b/LZT/h.c @@ -0,0 +1,303 @@ +#include +#include +#include +#include +void look(); /*声明查看函数*/ +void save(); /*声明保存函数*/ +void search_name(); /*声明按姓名查看函数*/ +void search_number(); /*声明按学号查看函数*/ +void order(); /*声明排序函数*/ +void del(); /*声明删除函数*/ +int openl(); /*声明打开函数*/ +void type(); /*声明输入函数*/ +void see(); /*声明打开并查看文件函数*/ +struct student /*定义学生信息的结构体类型*/ +{ + char num[15]; /*学号*/ + char name[20]; /*姓名*/ + char sex[4]; /*性别*/ + char age[3]; /*年龄*/ + char ad[20]; /*地址*/ + char tel[20]; /*电话*/ + char E[20]; /*邮箱*/ + char year[20];/*年份*/ + char month[12];/*月份*/ + char day[30];/*日期*/ +}stu[100]; +int n; /*声明一个全局变量*/ +void main() /*主函数即用户的操作界面*/ +{ + int b,flag=0; /*声明局部变量*/ + while(1) /*循环输出以下信息*/ + { + printf("\n\t\t\t欢迎来到学生信息管理系统!\n"); + printf("\n\t\t\t\t 刘紫婷制作\n"); + printf("\t\t\t-------------------------------\n"); + printf("\t\t\t1.录入学生的信息\n\n"); /*录入学生的信息*/ + printf("\t\t\t2.查看录入的学生信息\n\n"); /*查看录入的学生信息*/ + printf("\t\t\t3.按姓名查看学生的信息\n\n"); /*按姓名查看学生的信息*/ + printf("\t\t\t4.按学号查看学生的信息\n\n"); /*按学号查看学生的信息*/ + printf("\t\t\t5.按学号对学生信息排序\n\n"); /*排序*/ + printf("\t\t\t6.删除学生信息\n\n"); /*删除学生信息*/ + printf("\t\t\t7.保存学生信息\n\n"); /*保存*/ + printf("\t\t\t8.打开文件\n\n"); /*打开文件*/ + printf("\t\t\t0.退出\n\n"); /*退出*/ + printf("\t\t\t请输入你的选择:"); + scanf("%d",&b); + switch(b) + { + case 1:type();break; /*调用录入学生信息函数*/ + case 2:look();break; /*调用查看函数*/ + case 3:search_name();break; /*调用姓名查看学生信息函数*/ + case 4:search_number();break; /*调用学号查看学生信息函数*/ + case 5:order();break; /*调用学号排序学生信息函数*/ + case 6:del();break;/*调用删除函数*/ + case 7:save();break;/*调用保存函数*/ + case 8:see();break;/*调用打开文件函数*/ + case 0:flag=1;break;/*退出SWITCH语句*/ + default :printf("错误!"); + } + if(flag) + break; /*如果选择0就退出循环*/ + } +} +void type() /*定义录入学生信息函数*/ +{ + int i; /*定义局部变量*/ + printf("\t\t输出你想输入的学生信息个数:"); + scanf("%d",&n); + for(i=0;i