資源簡(jiǎn)介
C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序(書店銷售管理系統(tǒng))1800行代碼 C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序(書店銷售管理系統(tǒng))1800行代碼 C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序(書店銷售管理系統(tǒng))1800行代碼 C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序(書店銷售管理系統(tǒng))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/*銷售時(shí)間*/
{??
int?year;
int?month;
????int?day;
};
struct?bookstore1
{
char?book_number[10];/*圖書編號(hào)*/
char?book_name[50];/*書名*/
? char?book_author[20];/*作者*/
? float??book_money;/*價(jià)格*/
char?book_publisher[20];/*出版社*/
? char?book_variety[12];/*圖書類別*/
int?book_amount;/*添加入庫(kù)數(shù)量*/
int?book_reserves;/*總庫(kù)數(shù)量*/
}store1[N]store11[N];
struct?bookstore2
{
char?sale_number[8];/*銷售人員編號(hào)*/
? char?sale_name[8];/*銷售人員姓名*/
? char?sale_sex[2];/*性別*/
? char?sale_passwords[10];/*登錄密碼*/
}store2[N];
struct?bookstore3
{
char?administrator_number[8];/*管理員編號(hào)*/
? char?administrator_name[8];/*管理員姓名*/
? char?administrator_sex[2];/*性別*/
? char?administrator_passwords[10];/*登錄密碼*/
}store3[N];
struct?bookstore4
{
int??customer_number;/*顧客號(hào)*/
? char?customer_name[8];/*顧客姓名*/
char?customer_sex[2];/*性別*/
? int??customer_vip;/*是否會(huì)員*/
? char?customer_bookid[10];/*購(gòu)買圖書編號(hào)*/
? int??customer_buy;/*購(gòu)買數(shù)量*/
? float?customer_price;
? struct?bookstore_time?time;/*銷售時(shí)間*/
}store4[N];
struct?bookstore5
{
char?vip_number[8];/*會(huì)員號(hào)*/
? char?vip_name[8];/*會(huì)員姓名*/
? char?vip_sex[2];/*性別*/
? char?vip_level[5];/*會(huì)員級(jí)別*/
}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還沒(méi)有添加圖書信息!!\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還沒(méi)有添加銷售人員信息!!\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還沒(méi)有添加管理人員信息!!\n“);
????return?i;
}
while(fread(&store3[i]sizeof(struct?bookstore3)1fp)==1)
{
????????i++;
????}
????fclose(fp);
??
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????54970??2015-11-23?00:33??C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序\C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序.c
?????文件????????3533??2016-03-09?21:02??C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序\C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序.dsp
?????文件?????????542??2016-03-09?21:05??C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序\C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序.dsw
?????文件???????58368??2017-05-24?14:10??C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序\C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序.ncb
?????文件???????48640??2017-05-24?14:10??C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序\C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序.opt
?????文件?????????268??2017-05-24?14:09??C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序\C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序.plg
?????文件???????54965??2016-01-08?19:24??C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序\C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序.txt
?????目錄???????????0??2016-12-22?13:32??C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序\Debug\
?????文件??????262208??2016-03-09?21:02??C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序\Debug\C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序.exe
?????文件??????296112??2016-03-09?21:02??C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序\Debug\C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序.ilk
?????文件??????132728??2016-03-09?21:02??C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序\Debug\C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序.obj
?????文件??????197544??2016-03-09?21:02??C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序\Debug\C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序.pch
?????文件??????508928??2016-03-09?21:02??C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序\Debug\C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序.pdb
?????文件???????33792??2017-05-24?14:09??C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序\Debug\vc60.idb
?????文件???????45056??2016-03-09?21:02??C語(yǔ)言項(xiàng)目實(shí)訓(xùn)程序\Debug\vc60.pdb
評(píng)論
共有 條評(píng)論