资源简介
C语言项目实训程序(书店销售管理系统)1800行代码 C语言项目实训程序(书店销售管理系统)1800行代码 C语言项目实训程序(书店销售管理系统)1800行代码 C语言项目实训程序(书店销售管理系统)1800行代码

代码片段和文件信息
#include “stdio.h“
#include“stdlib.h“
#include“string.h“
#include“conio.h“
#define N 100
struct sell
{
char f[20];
int i;
float j;
}amount[N];
struct bookstore_time/*销售时间*/
{
int year;
int month;
int day;
};
struct bookstore1
{
char book_number[10];/*图书编号*/
char book_name[50];/*书名*/
char book_author[20];/*作者*/
float book_money;/*价格*/
char book_publisher[20];/*出版社*/
char book_variety[12];/*图书类别*/
int book_amount;/*添加入库数量*/
int book_reserves;/*总库数量*/
}store1[N]store11[N];
struct bookstore2
{
char sale_number[8];/*销售人员编号*/
char sale_name[8];/*销售人员姓名*/
char sale_sex[2];/*性别*/
char sale_passwords[10];/*登录密码*/
}store2[N];
struct bookstore3
{
char administrator_number[8];/*管理员编号*/
char administrator_name[8];/*管理员姓名*/
char administrator_sex[2];/*性别*/
char administrator_passwords[10];/*登录密码*/
}store3[N];
struct bookstore4
{
int customer_number;/*顾客号*/
char customer_name[8];/*顾客姓名*/
char customer_sex[2];/*性别*/
int customer_vip;/*是否会员*/
char customer_bookid[10];/*购买图书编号*/
int customer_buy;/*购买数量*/
float customer_price;
struct bookstore_time time;/*销售时间*/
}store4[N];
struct bookstore5
{
char vip_number[8];/*会员号*/
char vip_name[8];/*会员姓名*/
char vip_sex[2];/*性别*/
char vip_level[5];/*会员级别*/
}store5[N];
void w1_fp(char ch[]struct bookstore1 store1[]int aint flag)
{
FILE *fp;
if((fp=flag?fopen(ch“ab“):fopen(ch“wb“))==NULL)
{
printf(“cannot open this file\n“);
return;
}
fwrite(&store1[0]sizeof(struct bookstore1)afp);
fclose(fp);
}
int r1_fp(char ch[]struct bookstore1 store1[])
{
FILE *fp;
int i=0;
if((fp=fopen(ch“rb“))==NULL)
{
printf(“\n\t\t还没有添加图书信息!!\n“);
return i;
}
while(fread(&store1[i]sizeof(struct bookstore1)1fp)==1)
{
i++;
}
fclose(fp);
return(i);
}
void w2_fp(char ch[]struct bookstore2 store2[]int aint flag)
{
FILE *fp;
if((fp=flag?fopen(ch“ab“):fopen(ch“wb“))==NULL)
{
printf(“cannot open this file\n“);
return;
}
fwrite(&store2[0]sizeof(struct bookstore2)afp);
fclose(fp);
}
int r2_fp(char ch[]struct bookstore2 store2[])
{
FILE *fp;
int i=0;
if((fp=fopen(ch“rb“))==NULL)
{
printf(“\n\t\t还没有添加销售人员信息!!\n“);
return i;
}
while(fread(&store2[i]sizeof(struct bookstore2)1fp)==1)
{
i++;
}
fclose(fp);
return(i);
}
void w3_fp(char ch[]struct bookstore3 store3[]int aint flag)
{
FILE *fp;
if((fp=flag?fopen(ch“ab“):fopen(ch“wb“))==NULL)
{
printf(“cannot open this file\n“);
return;
}
fwrite(&store3[0]sizeof(struct bookstore3)afp);
fclose(fp);
}
int r3_fp(char ch[]struct bookstore3 store3[])
{
FILE *fp;
int i=0;
if((fp=fopen(ch“rb“))==NULL)
{
printf(“\n\t\t还没有添加管理人员信息!!\n“);
return i;
}
while(fread(&store3[i]sizeof(struct bookstore3)1fp)==1)
{
i++;
}
fclose(fp);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 54970 2015-11-23 00:33 C语言项目实训程序\C语言项目实训程序.c
文件 3533 2016-03-09 21:02 C语言项目实训程序\C语言项目实训程序.dsp
文件 542 2016-03-09 21:05 C语言项目实训程序\C语言项目实训程序.dsw
文件 58368 2017-05-24 14:10 C语言项目实训程序\C语言项目实训程序.ncb
文件 48640 2017-05-24 14:10 C语言项目实训程序\C语言项目实训程序.opt
文件 268 2017-05-24 14:09 C语言项目实训程序\C语言项目实训程序.plg
文件 54965 2016-01-08 19:24 C语言项目实训程序\C语言项目实训程序.txt
目录 0 2016-12-22 13:32 C语言项目实训程序\Debug\
文件 262208 2016-03-09 21:02 C语言项目实训程序\Debug\C语言项目实训程序.exe
文件 296112 2016-03-09 21:02 C语言项目实训程序\Debug\C语言项目实训程序.ilk
文件 132728 2016-03-09 21:02 C语言项目实训程序\Debug\C语言项目实训程序.obj
文件 197544 2016-03-09 21:02 C语言项目实训程序\Debug\C语言项目实训程序.pch
文件 508928 2016-03-09 21:02 C语言项目实训程序\Debug\C语言项目实训程序.pdb
文件 33792 2017-05-24 14:09 C语言项目实训程序\Debug\vc60.idb
文件 45056 2016-03-09 21:02 C语言项目实训程序\Debug\vc60.pdb
相关资源
- 操作系统c语言模拟文件管理系统844
- C语言开发实战宝典
- C++中头文件与源文件的作用详解
- C语言代码高亮html输出工具
- 猜数字游戏 c语言代码
- C语言课程设计
- 数字电位器C语言程序
- CCS FFT c语言算法
- 使用C语言编写的病房管理系统
- 通信过程中的RS编译码程序(c语言)
- 计算机二级C语言上机填空,改错,编
- 用回溯法解决八皇后问题C语言实现
- 简易教务管理系统c语言开发文档
- 操作系统课设 读写者问题 c语言实现
- 小波变换算法 c语言版
- C流程图生成器,用C语言代码 生成C语
- 3des加密算法C语言实现
- 简单的C语言点对点聊天程序
- 单片机c语言源程序(51定时器 八个按
- 个人日常财务管理系统(C语言)
- c语言电子商务系统
- 小甲鱼C语言课件 源代码
- 将图片转换为C语言数组的程序
- C语言实现的一个内存泄漏检测程序
- DES加密算法C语言实现
- LINUX下命令行界面的C语言细胞游戏
- 用单片机控制蜂鸣器播放旋律程序(
- 学校超市选址问题(数据结构C语言版
- 电子时钟 有C语言程序,PROTEUS仿真图
- 尚观培训linux许巍老师关于c语言的课
评论
共有 条评论