没有合适的资源?快使用搜索试试~ 我知道了~
C语言课程设计—会议签到系统
5星 · 超过95%的资源 需积分: 14 20 下载量 11 浏览量
2009-06-30
11:11:59
上传
评论 1
收藏 4KB TXT 举报
温馨提示
试读
6页
C语言 完整版 与大家分享 TXT文件 运行后正确无误
资源推荐
资源详情
资源评论
#include <stdlib.h>
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
typedef struct message{ /*定义数据结构*/
long int number;
char name[10];
char sex[3];
char workplace[20];
char job[5];
long int tel;
int flag;
struct message *next;
}*finger; /*指向结构体的指针*/
void menu(){ /*屏幕输出菜单*/
printf("********************************************************************************\n");
printf("**1.录入员工信息 **\n");
printf("**2.在此签到,并输出人员签到结果 **\n");
printf("**3.排序 **\n");
printf("**4.退出 **\n");
printf("********************************************************************************\n");
}
void add(){ /*录入员工信息子函数*/
FILE *f1;
finger top=NULL,p=NULL,t=NULL;
p=(finger)malloc(sizeof(message));
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
typedef struct message{ /*定义数据结构*/
long int number;
char name[10];
char sex[3];
char workplace[20];
char job[5];
long int tel;
int flag;
struct message *next;
}*finger; /*指向结构体的指针*/
void menu(){ /*屏幕输出菜单*/
printf("********************************************************************************\n");
printf("**1.录入员工信息 **\n");
printf("**2.在此签到,并输出人员签到结果 **\n");
printf("**3.排序 **\n");
printf("**4.退出 **\n");
printf("********************************************************************************\n");
}
void add(){ /*录入员工信息子函数*/
FILE *f1;
finger top=NULL,p=NULL,t=NULL;
p=(finger)malloc(sizeof(message));
top=p;
while(1){
printf("\n请输入员工信息,输入0时结束录入");
scanf("%d%s%s%s%s%d",&p->number,p->name,p->sex,p->workplace,p->job,&p->tel);
/*分部分输入*/
p->flag=0;
if(p->number==0){
free(p);
t->next=NULL;
break;
}
t=p;
p=(finger)malloc(sizeof(message));
t->next=p;
}
p=NULL;
if((f1=fopen("D:\\meeting.dat","w"))==NULL){ /*把链表中信息存入文件*/
printf("不能创建文件!!");
exit(0);
}
p=top;
while(p!=NULL){
fprintf(f1,"%d %s %s %s %s %d\n",p->number,p->name,p->sex,p->workplace,p->job,p->tel);
p=p->next;
}
}
void signin(){ /*签到,标记*/
int a=1,i=0,j=0;
FILE *f1;
while(1){
printf("\n请输入员工信息,输入0时结束录入");
scanf("%d%s%s%s%s%d",&p->number,p->name,p->sex,p->workplace,p->job,&p->tel);
/*分部分输入*/
p->flag=0;
if(p->number==0){
free(p);
t->next=NULL;
break;
}
t=p;
p=(finger)malloc(sizeof(message));
t->next=p;
}
p=NULL;
if((f1=fopen("D:\\meeting.dat","w"))==NULL){ /*把链表中信息存入文件*/
printf("不能创建文件!!");
exit(0);
}
p=top;
while(p!=NULL){
fprintf(f1,"%d %s %s %s %s %d\n",p->number,p->name,p->sex,p->workplace,p->job,p->tel);
p=p->next;
}
}
void signin(){ /*签到,标记*/
int a=1,i=0,j=0;
FILE *f1;
剩余5页未读,继续阅读
资源评论
- qq_437541662018-11-21比较不错,对我来说非常有用
- lzz52352013-06-04不错的代码,当毕设比较简单
- 天冰ice2013-12-10还好,可以进行一定参考
zhq200604071100
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功