各位,跪谢了!不能见死不救啊!

salyly 2003-09-13 11:03:53
这个职工管理系统还要求能显示某年月以前和某年月以后出生的信息!该怎么办!大家帮帮我了!
#include<stdio.h>
#include <stdlib.h>
#include <string.h>

struct person
{
char name[15];
char id[15];
char sex[15];
char birth[15];
char prof[15];
char educat[15];
char salary[15];
char marriage[15];
};

char filename[50];
FILE *fp;
void creat();
void output();
void search();
void lookfor();
void locate();
void append();
void modify();
void delete();

void main(void)
{
int m;

creat();
while(1)
{ printf("\n\n********************************************************************************");
printf("\ncreat the information of new employee,please enter 1");
printf("\nsearch the information of certain employee,please enter 2");
printf("\nmodify certain information of certain employee,please enter 3");
printf("\ndelete the information of certain employee,please enter 4");
printf("\noutput the information of all employees,please enter 5");
printf("\noutput tne man of certain prof,please enter 6");
printf("\noutput the man after certain date,please enter 7");
printf("\noutput the man before certain date,pleae enter 8");
printf("\noutput the man hasn't marry,please enter 9");
printf("\nexit,please enter 0\n\n");
printf("********************************************************************************\n");
scanf("%d",&m);
if(m>=0&&m<=9)
{
switch(m)
{
case 1: append(); break;
case 2: search(); break;
case 3: modify(); break;
case 4: delete(); break;
case 5: output(); break;
case 6: lookfor(); break;
case 7: search(); break;
case 8: search(); break;
case 9: locate(); break;
case 0: exit(0);
}
printf("\n\nfinish,choose agian:");
}
else
printf("\n\nerror,choose again:");
}
}

void creat()
{
struct person one;
printf("\n\n********************************************************************************");
printf("\n\n weilcome to employee information managemnet system\n");
printf("\n********************************************************************************\n");
printf("\nenter file name:");
scanf("%s",filename);
if((fp=fopen(filename,"w"))==NULL)
{
printf("\nfail!");
exit(1);
}
fprintf(fp,"%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s\n","name","id","sex","birth","prof","educat","salary","marriage");
printf("\nenter the name,id, sex,birth,prof,educat,salary and marriage(end with0)\n");
scanf("%s",one.name);
while(strcmp(one.name,"0"))
{
scanf("%s%s%s%s%s%s%s",one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
fprintf(fp,"%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
scanf("%s",one.name);
}
fclose(fp);
}

void output()
{
struct person one;

if((fp=fopen(filename,"r"))==NULL)
{
printf("\nfail!");
exit(1);
}
printf("\n\n%50s\n"," employee information management system\n\n");
while(!feof(fp))
{
fscanf(fp,"%s%s%s%s%s%s%s%s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
printf("%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
}
fclose(fp);
}

void append()
{
struct person one;

if((fp=fopen(filename,"a"))==NULL)
{
printf("\nfail!");
exit(1);
}
printf("\nenter new created employee's name,id, sex,birth,prof,educat,salary and marriage\n");
scanf("%s%s%s%s%s%s%s%s",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
fprintf(fp,"%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
fclose(fp);
}

void search()
{
int k=0;
char namekey[8];
struct person one;

printf("\nenter name:");
scanf("%s",namekey);

if((fp=fopen(filename,"rb"))==NULL)
{
printf("\nfail!");
exit(1);
}
while(!feof(fp))
{
fscanf(fp,"%s%s%s%s%s%s%s%s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
if(!strcmp(namekey,one.name))
{
printf("\n\nfind,here is:");
printf("\n%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
k=1;
}
}
if(!k)
printf("\n\nsorry,no such one!");
fclose(fp);
}
void lookfor()
{
int k=0;
char profkey[8];
struct person one;

printf("\nenter prof:");
scanf("%s",profkey);

if((fp=fopen(filename,"rb"))==NULL)
{
printf("\nfail!");
exit(1);
}
while(!feof(fp))
{
fscanf(fp,"%s%s%s%s%s%s%s%s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
if(!strcmp(profkey,one.prof))
{
printf("\n\nfind,here is:");
printf("\n%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
k=1;
}
}
if(!k)
printf("\n\nsorry,no such one!");
fclose(fp);
}
void locate()
{
int k=0;
char marriagekey[8];
struct person one;

printf("\nenter marriage:");
scanf("%s",marriagekey);

if((fp=fopen(filename,"rb"))==NULL)
{
printf("\nfail!");
exit(1);
}
while(!feof(fp))
{
fscanf(fp,"%s%s%s%s%s%s%s%s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
if(!strcmp(marriagekey,one.marriage))
{
printf("\n\nfind,here is:");
printf("\n%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
k=1;
}
}
if(!k)
printf("\n\nsorry,no such one!");
fclose(fp);
}
void modify()
{
int k=0;
long offset;
char namekey[8];
struct person one;

printf("\nenter name:");
scanf("%s",namekey);

if((fp=fopen(filename,"r+"))==NULL)
{
printf("\nfail!");
exit(1);
}
while(!feof(fp))
{
offset=ftell(fp);
fscanf(fp,"%s%s%s%s%s%s%s%s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
if(!strcmp(namekey,one.name))
{
k=1;
break;
}
}
if(k)
{
printf("\nfind,here is:");
printf("\n%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
printf("\nenter new name,id,sex,birth,prof,educat,salary and marriage:\n");
scanf("%s%s%s%s%s%s%s%s",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
fseek(fp,offset,SEEK_SET);
printf("%ld",ftell(fp));
fprintf(fp,"%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
}
else
printf("\nsorry,no such one!");
fclose(fp);
}

void delete()
{
int m,k=0;
long offset1;
char namekey[8];
struct person one;

printf("\nenter name:");
scanf("%s",namekey);
if((fp=fopen(filename,"r+"))==NULL)
{
printf("\nfail!");
exit(1);
}
while(!feof(fp))
{
offset1=ftell(fp);
fscanf(fp,"%s%s%s%s%s%s%s%s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
if(!strcmp(namekey,one.name))
{
k=1;
break;
}
}
if(k)
{
printf("\nfind,here is:");
printf("\n%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
printf("\nsure to del,enter 1;else,enter 0:");
scanf("%d",&m);
if(m)
{
fseek(fp,offset1,SEEK_SET);
fprintf(fp,"%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n","","","","","","","","");
}
}
else
printf("\nsorry,no such one!");
fclose(fp);
}
...全文
85 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
salyly 2003-09-14
  • 打赏
  • 举报
回复
可是错误和警告太多了!大哥!
hzbird 2003-09-14
  • 打赏
  • 举报
回复
就是在OUtput函数增加一个输出就可以了把
ppaannssyy 2003-09-14
  • 打赏
  • 举报
回复
下一半
void delete()
{
int m,k=0;
long offset1;
char namekey[8];
struct person one;

printf("\nenter name:");
scanf("%s",namekey);
if((fp=fopen(filename,"r+"))==NULL)
{
printf("\nfail!");
exit(1);
}
while(!feof(fp))
{
offset1=ftell(fp);
fscanf(fp,"%s%s%s%s%s%s%s%s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
if(!strcmp(namekey,one.name))
{
k=1;
break;
}
}
if(k)
{
printf("\nfind,here is:");
printf("\n%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
printf("\nsure to del,enter 1;else,enter 0:");
scanf("%d",&m);
if(m)
{
fseek(fp,offset1,SEEK_SET);
fprintf(fp,"%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n","","","","","","","","");
}
}
else
printf("\nsorry,no such one!");
fclose(fp);
}
void searchday(int flag) /*flag用来标记search after or before*/
{
char *p=malloc(120);
struct people *ptr;
int cy,cm,cd,y,m,d; /*c=certain */
printf(" \n\n\n please input certain day!!\n");
printf(" yyyy mm dd");
scanf("%d %d %d",&cy,&cm,&cd);
if(cy>2000||cy<1900||cm>12||cm<1||cd>31||cd<1)
printf("\n\n\n you input a wrong day");
if((fp=fopen(filename,"r+"))==NULL)
{
printf("\nfail!");
exit(1);
}
while(fread(p,15,8,fp)!=0)
{
ptr=p;
y=ptr->birth[0]*1000+ptr->birth[1]*100+ptr->birth[2]*10+ptr->birth[3]; /*将string转成int,好加以比较 */
m=ptr->birth[4]*10+ptr->birth[5];
d=ptr->birth[6]*10+ptr->birth[7];
if ( flag==1 )
{
if( (y>cy)||(y==cy&&m>cm)||(y==cy&&m==cm&&d>cd) )
printf("%s",ptr->name);
}
else
{
if( (y<cy)||(y==cy&&m<cm)|| (y==cy&&m==cm&&d<cd))
printf("%s",ptr->name);
}
}
free(p);
fclose(fp);
}
ppaannssyy 2003-09-14
  • 打赏
  • 举报
回复
我作了一个,TC2。0过了e-mail __pansy__@mail.china.com
#include<stdio.h>
#include <stdlib.h>
#include <string.h>

struct person
{
char name[15];
char id[15];
char sex[15];
char birth[15];
char prof[15];
char educat[15];
char salary[15];
char marriage[15];
};


char filename[50];
FILE *fp;
void creat();
void output();
void searchday(int a);
void lookfor();
void locate();
void append();
void modify();
void delete();
void search();
void main(void)
{
int m;

creat();
while(1)
{ printf("\n\n********************************************************************************");
printf("\ncreat the information of new employee,please enter 1");
printf("\nsearch the information of certain employee,please enter 2");
printf("\nmodify certain information of certain employee,please enter 3");
printf("\ndelete the information of certain employee,please enter 4");
printf("\noutput the information of all employees,please enter 5");
printf("\noutput tne man of certain prof,please enter 6");
printf("\noutput the man after certain date,please enter 7");
printf("\noutput the man before certain date,pleae enter 8");
printf("\noutput the man hasn't marry,please enter 9");
printf("\nexit,please enter 0\n\n");
printf("********************************************************************************\n");
scanf("%d",&m);
if(m>=0&&m<=9)
{
switch(m)
{
case 1: append(); break;
case 2: search(); break;
case 3: modify(); break;
case 4: delete(); break;
case 5: output(); break;
case 6: lookfor(); break;
case 7: searchday(1); break;
case 8: searchday(0); break;
case 9: locate(); break;
case 0: exit(0);
}
printf("\n\nfinish,choose agian:");
}
else
printf("\n\nerror,choose again:");
}
}

void creat()
{
struct person one;
printf("\n\n********************************************************************************");
printf("\n\n weilcome to employee information managemnet system\n");
printf("\n********************************************************************************\n");
printf("\nenter file name:");
scanf("%s",filename);
if((fp=fopen(filename,"w"))==NULL)
{
printf("\nfail!");
exit(1);
}
fprintf(fp,"%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s\n","name","id","sex","birth","prof","educat","salary","marriage");
printf("\nenter the name,id, sex,birth,prof,educat,salary and marriage(end with0)\n");
scanf("%s",one.name);
while(strcmp(one.name,"0"))
{
scanf("%s%s%s%s%s%s%s",one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
fprintf(fp,"%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
scanf("%s",one.name);
}
fclose(fp);
}

void output()
{
struct person one;

if((fp=fopen(filename,"r"))==NULL)
{
printf("\nfail!");
exit(1);
}
printf("\n\n%50s\n"," employee information management system\n\n");
while(!feof(fp))
{
fscanf(fp,"%s%s%s%s%s%s%s%s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
printf("%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
}
fclose(fp);
}

void append()
{
struct person one;

if((fp=fopen(filename,"a"))==NULL)
{
printf("\nfail!");
exit(1);
}
printf("\nenter new created employee's name,id, sex,birth,prof,educat,salary and marriage\n");
scanf("%s%s%s%s%s%s%s%s",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
fprintf(fp,"%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
fclose(fp);
}



void search()
{
int k=0;
char namekey[8];
struct person one;

printf("\nenter name:");
scanf("%s",namekey);

if((fp=fopen(filename,"rb"))==NULL)
{
printf("\nfail!");
exit(1);
}
while(!feof(fp))
{
fscanf(fp,"%s%s%s%s%s%s%s%s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
if(!strcmp(namekey,one.name))
{
printf("\n\nfind,here is:");
printf("\n%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
k=1;
}
}
if(!k)
printf("\n\nsorry,no such one!");
fclose(fp);
}
void lookfor()
{
int k=0;
char profkey[8];
struct person one;

printf("\nenter prof:");
scanf("%s",profkey);

if((fp=fopen(filename,"rb"))==NULL)
{
printf("\nfail!");
exit(1);
}
while(!feof(fp))
{
fscanf(fp,"%s%s%s%s%s%s%s%s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
if(!strcmp(profkey,one.prof))
{
printf("\n\nfind,here is:");
printf("\n%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
k=1;
}
}
if(!k)
printf("\n\nsorry,no such one!");
fclose(fp);
}
void locate()
{
int k=0;
char marriagekey[8];
struct person one;

printf("\nenter marriage:");
scanf("%s",marriagekey);

if((fp=fopen(filename,"rb"))==NULL)
{
printf("\nfail!");
exit(1);
}
while(!feof(fp))
{
fscanf(fp,"%s%s%s%s%s%s%s%s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
if(!strcmp(marriagekey,one.marriage))
{
printf("\n\nfind,here is:");
printf("\n%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
k=1;
}
}
if(!k)
printf("\n\nsorry,no such one!");
fclose(fp);
}
void modify()
{
int k=0;
long offset;
char namekey[8];
struct person one;

printf("\nenter name:");
scanf("%s",namekey);

if((fp=fopen(filename,"r+"))==NULL)
{
printf("\nfail!");
exit(1);
}
while(!feof(fp))
{
offset=ftell(fp);
fscanf(fp,"%s%s%s%s%s%s%s%s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
if(!strcmp(namekey,one.name))
{
k=1;
break;
}
}
if(k)
{
printf("\nfind,here is:");
printf("\n%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
printf("\nenter new name,id,sex,birth,prof,educat,salary and marriage:\n");
scanf("%s%s%s%s%s%s%s%s",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
fseek(fp,offset,SEEK_SET);
printf("%ld",ftell(fp));
fprintf(fp,"%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
}
else
printf("\nsorry,no such one!");
fclose(fp);
}
ppaannssyy 2003-09-14
  • 打赏
  • 举报
回复
我作了一个你看行不?tc2.0下过了情况 e-mail __pansy__@mail.china.com
#include<stdio.h>
#include <stdlib.h>
#include <string.h>

struct person
{
char name[15];
char id[15];
char sex[15];
char birth[15];
char prof[15];
char educat[15];
char salary[15];
char marriage[15];
};


char filename[50];
FILE *fp;
void creat();
void output();
void searchday(int a);
void lookfor();
void locate();
void append();
void modify();
void delete();
void search();
void main(void)
{
int m;

creat();
while(1)
{ printf("\n\n********************************************************************************");
printf("\ncreat the information of new employee,please enter 1");
printf("\nsearch the information of certain employee,please enter 2");
printf("\nmodify certain information of certain employee,please enter 3");
printf("\ndelete the information of certain employee,please enter 4");
printf("\noutput the information of all employees,please enter 5");
printf("\noutput tne man of certain prof,please enter 6");
printf("\noutput the man after certain date,please enter 7");
printf("\noutput the man before certain date,pleae enter 8");
printf("\noutput the man hasn't marry,please enter 9");
printf("\nexit,please enter 0\n\n");
printf("********************************************************************************\n");
scanf("%d",&m);
if(m>=0&&m<=9)
{
switch(m)
{
case 1: append(); break;
case 2: search(); break;
case 3: modify(); break;
case 4: delete(); break;
case 5: output(); break;
case 6: lookfor(); break;
case 7: searchday(1); break;
case 8: searchday(0); break;
case 9: locate(); break;
case 0: exit(0);
}
printf("\n\nfinish,choose agian:");
}
else
printf("\n\nerror,choose again:");
}
}

void creat()
{
struct person one;
printf("\n\n********************************************************************************");
printf("\n\n weilcome to employee information managemnet system\n");
printf("\n********************************************************************************\n");
printf("\nenter file name:");
scanf("%s",filename);
if((fp=fopen(filename,"w"))==NULL)
{
printf("\nfail!");
exit(1);
}
fprintf(fp,"%-8s%-8s%-8s%-8s%-8s%-8s%-8s%-8s\n","name","id","sex","birth","prof","educat","salary","marriage");
printf("\nenter the name,id, sex,birth,prof,educat,salary and marriage(end with0)\n");
scanf("%s",one.name);
while(strcmp(one.name,"0"))
{
scanf("%s%s%s%s%s%s%s",one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
fprintf(fp,"%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
scanf("%s",one.name);
}
fclose(fp);
}

void output()
{
struct person one;

if((fp=fopen(filename,"r"))==NULL)
{
printf("\nfail!");
exit(1);
}
printf("\n\n%50s\n"," employee information management system\n\n");
while(!feof(fp))
{
fscanf(fp,"%s%s%s%s%s%s%s%s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
printf("%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
}
fclose(fp);
}

void append()
{
struct person one;

if((fp=fopen(filename,"a"))==NULL)
{
printf("\nfail!");
exit(1);
}
printf("\nenter new created employee's name,id, sex,birth,prof,educat,salary and marriage\n");
scanf("%s%s%s%s%s%s%s%s",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
fprintf(fp,"%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
fclose(fp);
}

void search()
{
int k=0;
char namekey[8];
struct person one;

printf("\nenter name:");
scanf("%s",namekey);

if((fp=fopen(filename,"rb"))==NULL)
{
printf("\nfail!");
exit(1);
}
while(!feof(fp))
{
fscanf(fp,"%s%s%s%s%s%s%s%s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
if(!strcmp(namekey,one.name))
{
printf("\n\nfind,here is:");
printf("\n%-10s%-10s%-10s%-10s%-10s%-10s%-10s%-10s\n",one.name,one.id,one.sex,one.birth,one.prof,one.educat,one.salary,one.marriage);
k=1;
}
}
if(!k)
printf("\n\nsorry,no such one!");
fclose(fp);
}






ppaannssyy 2003-09-14
  • 打赏
  • 举报
回复
这个程序不可能在C++上过的,只能在C上过;其中用了C++的关键字作函数名;
widewave 2003-09-13
  • 打赏
  • 举报
回复
做我女朋友,我帮你改!
salyly 2003-09-13
  • 打赏
  • 举报
回复
就是要插入几段程序,好让它可以运行是通过操作显示某年月以前或以后出生的职工信息!大哥运行一下就知道了!谢谢了!帮帮忙!
zhaochong12 2003-09-13
  • 打赏
  • 举报
回复
......完全没注释?
njtu 2003-09-13
  • 打赏
  • 举报
回复
大哥,也太长了,把有问题的部分拿出来看看就可以了。
Leeu 2003-09-13
  • 打赏
  • 举报
回复
有没有搞错,有93个错误,还有2个警告
我是个初学者,以后再说,
只能是爱莫能助了
CYS8 2003-09-13
  • 打赏
  • 举报
回复
这位老兄,编译也同不过哦。还要帮你改程序阿??

那倒不如重新写一个省事~
hylz0 2003-09-13
  • 打赏
  • 举报
回复
so long
dreamfly8848 2003-09-13
  • 打赏
  • 举报
回复
实在太长了
whzhaha 2003-09-13
  • 打赏
  • 举报
回复
太长 太烦了 哎
salaciouswolf 2003-09-13
  • 打赏
  • 举报
回复
粗略看了一下,楼主用文件存取资料,而想进行数据库式的操作,有点难,只好用笨办法了,就是一条记录一条记录的读,判断。这里可以用两个文件指针,一个指向当前记录,一个指向当前记录的出生年月,我看你的程序中每一条记录长度是一定的,因此这两个指针的移动操作还是比较好算的,每次都只要移动固定的长度就可以了,这样应该可以实现。
lemon520 2003-09-13
  • 打赏
  • 举报
回复
太长了!
我从来不看这么长的程序!^_^
sakurar 2003-09-13
  • 打赏
  • 举报
回复
就这么两行程序,加要就加吧。
对了,我叫捷达达。
yiminggw 2003-09-13
  • 打赏
  • 举报
回复
94
搬不搬砖 2003-09-13
  • 打赏
  • 举报
回复
楼上的怎么能趁人之危呢
万一是个男的怎么办

15,440

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧