C + + 课程设计之服装信息管理系统。①代码分析(含有源码)

本文介绍了一个简单的服装管理系统,包括服装和VIP客户的基本操作,如增加、删除、查询等,并提供了通过不同属性进行查询的功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

文件包含 

头文件

#include<iostream>
#include<string>
#include<stdlib.h>
#include<conio.h>
#include<windows.h>
#include<fstream>
using namespace std;

// boss类
class VIP
{
public:
	int vnum;	// boss号
	string name;	// boss姓名
	int num;		//服装编号
	string bookName;  //服装名
	string author;	//设计者?
	string press;	//出版社
	VIP *next;    //指针

};

//服装结点类
class	Node
{
public:
	
	int num;		//服装编号
	float prize;
	string bookName;  //服装名
	string author;	//设计者?
	string press;	//出版社
	Node *next;		//指针
int times = 0;   //计数器 

};

VIP vip[100];
Node book[100];
int times=0;
	
	void BookSysterm(); //系统管理
	void SaveData();     //保存数据
	void OpenData();      //打开数据	
	void Index();		//首页
	void BookInterface();		//服装管理界面
	void VIPInterface();		// boss管理界面
	void DeleteBook();	//删除服装函数
	void LookupBookIn();	//服装查询页面
	void LookupVIPIn();// boss查询页面	
	void add();	//增加服装函数
	void Output(Node p);	//输出服装信息函数
	int LookupBook();	//通过服装名查找
	void LookupAuthor();	//通过设计者?名查找
	int LookupNum();		//通过编号查找
	void LookupPress();	//通过出版社查找	
	void addVIP();		//增加 boss函数
	void OutputVIP(VIP s);		//输出 boss信息函数
	int LookupNumVIP();		//按编号查询 boss
	void LookupNameVIP();		//按 boss姓名查找 boss
	void DeleteVIPbook();		//删除 boss借服装信息
	void Delete();		//删除 boss函数
	void Query();		//根据 boss编号查询借服装信息
	void Return();		//还服装函数
	void Borrow();		//服装借阅函数

.cpp文件

#include <iostream>
	#include"yifu.h"
	#include<windows.h>
#include<fstream>
using namespace std;

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) 
{
	cout<<"/t/t/t进入系统中";
for (int i = 0; i < 10; i++)
{
	Sleep(10);   //需要#include<windows.h> 
	cout << ".";
	}
	system("cls");
	Index();   //首页函数
	
	return 0;

}
 


//增加 服装函数
void add()
{
	for (int i = 0; i < 100; i++) {
		if (book[i].num == 0) {
			cout << "\n" << "\t" << "\t" << "\t" << "\t" << "请输入 服装编号:";
			cin >> book[i].num;
			cout << endl;
			cout << "\t" << "\t" << "\t" << "\t" << "请输入 服装名:";
			cin >> book[i].bookName;
			cout << endl;
			cout << "\t" << "\t" << "\t" << "\t" << "请输入设计师:";
			cin >> book[i].author;
			cout << endl;
			cout << "\t" << "\t" << "\t" << "\t" << "请输入品牌:";
			cin >> book[i].press;
			cout << "\t" << "\t" << "\t" << "\t" << "请输入 服装价格:";
			cin >> book[i].prize;
			cout << "\n" << "\t" << "\t" << "\t" << "\t" << " 服装添加成功" << "\n" << endl;
			break;
		}
		times++;
	}
	return;
}

//删除 服装函数
void DeleteBook() {
	int b = LookupNum();
	book[b].author = '\0';
	book[b].bookName = '\0';
	book[b].num = 0;
	book[b].press = '\0';
	  book[b].prize = 0;
	cout << "\n" << "\t" << "\t" << "\t" << "\t" << " 服装删除成功" << endl;
}

//输出 服装信息函数
void Output(int b) {
		for  ( int h = 1; h <= 120; h++)
				cout<<"-";
				cout << "\n";
	cout << "\t" << "\t" << "\t" << "\t" << " |  服装编号:" << book[b].num << "      |  服装名:" << book[b].bookName << "     |  设计师:" <<
	  book[b].author << "     |  品牌:" << book[b].press <<" |  价格"<<book[b].prize <<endl;
	  	for  ( int h = 1; h <= 120; h++)
				cout<<"-";
				cout << "\n";
				
}
void print( ) {
	int b; 
		
				for ( b= 0; b<10;b++)
				{
					for  ( int h = 1; h <= 120; h++)
				cout<<"-";
				cout << "\n";
	cout << "\t" << "\t" << "\t" << "\t" << " |  服装编号:" << book[b].num << "      |  服装名:" << book[b].bookName << "     |  设计师:" <<
	  book[b].author << "     |  品牌:" << book[b].press <<" |  价格"<<book[b].prize <<endl;
				 
				}

	   
					for  ( int h = 1; h <= 120; h++)
				cout<<"-";
				cout << "\n";
}
//通过 服装名查找
int LookupBook() {
	int j = 0;
	string bookname;
	cout << "\t" << "\t" << "\t" << "\t" << "请输入 服装名:";
	cin >> bookname;
	for (int i = 0; i < 100; i++) {
		if (book[i].bookName == bookname) {
			j = 1;
			Output(i);
			return i;
		}
	}
	if (j == 0) {
		cout << "\n" << "\t" << "\t" << "\t" << "\t" << "没有该 服装" << "\n" << endl;
	}
	return 1000;
}

//通过设计师名查找
void LookupAuthor() {
	int j = 0;
	string author;
	cout << "\t" << "\t" << "\t" << "\t" << "请输入设计师姓名:";
	cin >> author;
	for (int i = 0; i < 100; i++) {
		if (book[i].author == author) {
			j = 1;
			Output(i);
		}
	}
	if (j == 0) {
		cout << "\n" << "\t" << "\t" << "\t" << "\t" << "没有该 服装" << "\n" << endl;
	}
}

//通过编号查找
int LookupNum() {
	int j = 0;
	int num;
	cout << "\t" << "\t" << "\t" << "\t" << "请输入 服装编号:";
	cin >> num;
	for (int i = 0; i < 100; i++) {
		if (book[i].num == num) {
			j = 1;
			Output(i);
			return i;
		}
	}
	if (j == 0) {
		cout << "\n" << "\t" << "\t" << "\t" << "\t" << "没有该 服装" << "\n" << endl;
	}
	return 1000;
}

//通过品牌查找
void LookupPress() {
	int j = 0;
	string press;
	cout << "\t" << "\t" << "\t" << "\t" << "请输入 服装品牌:";
	cin >> press;
	for (int i = 0; i < 100; i++) {
		if (book[i].press == press) {
			j = 1;
			Output(i);
			break;
		}
	}
	if (j == 0) {
		cout << "\n" << "\t" << "\t" << "\t" << "\t" << "没有该 服装" << "\n" << endl;
	}
}

//增加 boss函数
void addVIP() {
	for (int i = 0; i < 100; i++) {
		if (vip[i].vnum == 0) {
			cout << "\t" << "\t" << "\t" << "\t" << "请输入 boss编号:";
			cin >> vip[i].vnum;
			cout << "\t" << "\t" << "\t" << "\t" << "请输入 boss名:";
			cin >> vip[i].name;
			cout << "\t" << "\t" << "\t" << "\t" << " boss添加成功" << "\n" << endl;
			break;
		}
	}
}

//输出 boss信息函数
void OutputVIP(int s) {
	for  ( int h = 1; h <= 120; h++)
				cout<<"-";
				cout << "\n";
	cout << "\t" << "\t" << "\t" << "\t" << "  |  boss编号:" << vip[s].vnum << "      |  boss姓名:" << vip[s].name << "\n" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "  |  服装编号:" << vip[s].num << "      |  服装名:" << vip[s].bookName << "     |  设计师:" 
	<< vip[s].author << "     |  品牌:" << vip[s].press << endl;
	for  ( int h = 1; h <= 120; h++)
				cout<<"-";
				cout << "\n";
}
//按编号查询 boss
int LookupNumVIP() {
	int j = 0;
	int num;
	cout << "\t" << "\t" << "\t" << "\t" << "请输入 boss编号:";
	cin >> num;
	for (int i = 0; i < 100; i++) {
		if (vip[i].vnum == num) {
			OutputVIP(i);
			j = 1;
			return i;
		}
	}
	if (j == 0) {
		cout << "\n" << "\t" << "\t" << "\t" << "\t" << "没有该 boss" << "\n" << endl;
	}
	return 1000;
}

//按 boss姓名查找 boss
void LookupNameVIP() {
	int j = 0;
	string name;
	cout << "\t" << "\t" << "\t" << "\t" << "请输入 boss姓名:";
	cin >> name;
	for (int i = 0; i < 100; i++) {
		if (vip[i].name == name) {
			j = 1;
			OutputVIP(i);
			break;
		}
	}
	if (j == 0) {
		cout << "\n" << "\t" << "\t" << "\t" << "\t" << "没有该 boss" << "\n" << endl;
	}
}

//删除 boss借 服装信息
void DeleteVIPbook() {
	int s = LookupNumVIP();
	vip[s].author = '\0';
	vip[s].bookName = '\0';
	vip[s].num = 0;
	vip[s].press = '\0';
	
}

//删除 boss函数
void Delete() {
	int s = LookupNumVIP();
	vip[s].name = '\0';
	vip[s].vnum = 0;
	vip[s].author = '\0';
	vip[s].bookName = '\0';
	vip[s].num = 0;
	vip[s].press = '\0';
	
	cout << "\n" << "\t" << "\t" << "\t" << "\t" << " boss删除成功" << endl;
}

//根据 boss编号查询借 服装信息
void Query() {
	LookupNumVIP();
}

//还 服装函数
void Return() {
	DeleteVIPbook();
	cout << "\n" << "\t" << "\t" << "\t" << "\t" << " 服装归还成功" << "\n" << endl;
}

// 服装借阅函数
void Borrow() {
	int b = LookupBook();
	int s = LookupNumVIP();
	vip[s].bookName = book[b].bookName;
	vip[s].author = book[b].author;
	vip[s].num = book[b].num;
	vip[s].press = book[b].press;
	cout << "\n" << "\t" << "\t" << "\t" << "\t" << "借 服装成功" << "\n" << endl;
}
//保存数据
void SaveData() {

	 //记录存入文件函数
//	fstream file("衣服.txt", ios::out|ios::binary);
//	if (!file) {
//		cout << "file can't open." << endl;
//		abort(); //立即终止当前进程, 产生异常程序终止
//	}
//	for (int i = 0; i < 100; i++)
//		file.write((char*)(&book[i]), sizeof(book[i]));
//	file.close();
//	ofstream outfile("衣服.dat",ios::out|ios::binary)	;
	ofstream outfile("衣服.txt",ios::out|ios::binary)	;
	 if(!outfile)
	 {
	 		cout<<"error...";
	 }
		for(int i = 0;i < 10;i++ )
		{
		//	outfile.write((char*)&book[i],sizeof(book[i]) );
		outfile<<book[i].num<<" " << book[i].bookName << " " << book[i].author 
		<< " " << book[i].press <<" "<<book[i].prize<< endl;
		}
		outfile.close();
		
//	int b = 0;
//	ofstream fw;
//	fw.open("C:\\Users\\欢迎来到露儿银行\\Desktop\\OK\\衣服.txt",ios::in|ios::out);			//打开文件
//	for (b=0; b < times; b++)
//		fw << book[b].num<<" " << book[b].bookName << " " << book[b].author 
//			<< " " << book[b].press << endl;				//读入一个数a
//	fw.close();
	cout << "ok!!!";
}
//打开数据
void OpenData() {
//	ofstream infile("衣服.txt",ios::out|ios::binary);
//		 if(!infile)
//	 {
//	 		cout<<"error...";
//	 }
	
//		ifstream infile ("衣服.dat",ios::out|ios::binary );
	ifstream infile ("衣服.txt",ios::out|ios::binary );
	if (!infile)
		{
			
			cout<<"error...";
			
		}
		for(int i = 0;i < 10;i++ )
		 { 		//	infile.read((char*)&book[i],sizeof(book[i]) );

		  	infile>>book[i].num>> book[i].bookName >> book[i].author 
		>> book[i].press >>book[i].prize;
		 }
		 infile.close();
		 cout << "OK!!";
		 system("pause");
//	int i=0,x;
//	ifstream fw;
//	
//	fw.open("C:\\Users\\欢迎来到露儿银行\\Desktop\\OK\\衣服.txt", ios::in | ios::out);
//	while (fw >> book[i].num >>book[i].bookName >> book[i].author >> book[i].press) {
//		i++;
//	}
//	fw.close();
////	cin >> x;
	

}
//首页
void Index() {
	int i;
	for (int i = 0; i < 10; i++)
{
	Sleep(10);
	cout << ".";
	}
	system("cls");
	cout << "\n" << "\t" << "\t" << "\t" << "\t" << "****************************************" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****            服装管理系统         ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****************************************" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****  1、 服装管理      2、 boss管理  ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****  3、系统管理      4、退出      ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****************************************" << "\n" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "请选择:";
	cin >> i;
	switch (i) {
	case 1:
		BookInterface();
		break;
	case 2:
		VIPInterface();
		break;
	case 3:
		BookSysterm();
		break;
	case 4:
		break;
	default:
		cout << "\n" << "\t" << "\t" << "\t" << "\t" << "请输入1或2" << "\n" << endl;
		cout << "\n" << "\t" << "\t" << "\t" << "\t";
		system("pause");
		Index();
	}
}

// 服装管理界面
void BookInterface() {
	for (int i = 0; i < 10; i++)
{
	Sleep(10);
	cout << ".";
	}
	system("cls");
	int i;
	cout << "\n" << "\t" << "\t" << "\t" << "\t" << "****************************************" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****           服装管理系统          ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****************************************" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****  1、增加 服装      2、查询 服装  ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
//	cout << "\t" << "\t" << "\t" << "\t" << "****  3、 服装借阅      4、 服装归还  ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****  3、删除 服装      4.返回首页  ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****************************************" << "\n" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "请选择:";
	cin >> i;
	switch (i) {
	case 1:
		add();	//增加 服装函数
		cout << "\n" << "\t" << "\t" << "\t" << "\t";
		system("pause");
		BookInterface();
		break;
	case 2:
		LookupBookIn();	// 服装查询页面
		break;
//	case 3:
//	 Output(10)	;// 服装借阅函数
////		cout << "\n" << "\t" << "\t" << "\t" << "\t";
////		system("pause");
////		BookInterface();
//		break;
//	case 4:
//		Return();		//还 服装函数
//		cout << "\n" << "\t" << "\t" << "\t" << "\t";
//		system("pause");
//		BookInterface();
//		break;
	case 3:
		DeleteBook();	//删除 服装函数
		cout << "\n" << "\t" << "\t" << "\t" << "\t";
		system("pause");
		BookInterface();
		break;
	case 4:
		Index();
	default:
		cout << "\n" << "\t" << "\t" << "\t" << "\t" << "请输入对应编号" << "\n" << endl;
		cout << "\n" << "\t" << "\t" << "\t" << "\t";
		system("pause");
		BookInterface();
	}
}

// boss管理界面
void VIPInterface() {
	for (int i = 0; i < 10; i++)
{
	Sleep(10);
	cout << ".";
	}
	system("cls");
	int i;
	cout << "\n" << "\t" << "\t" << "\t" << "\t" << "****************************************" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****            服装管理系统         ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****************************************" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****  1、增加 boss           2、查询 boss  ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****  3、boss使用服装信息      4、删除 boss  ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****          5、返回首页           ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****************************************" << "\n" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "请选择:";
	cin >> i;
	switch (i) {
	case 1:
		addVIP();		//增加 boss函数
		cout << "\n" << "\t" << "\t" << "\t" << "\t";
		system("pause");
		VIPInterface();
		break;
	case 2:
		LookupVIPIn();  // boss查询页面
		break;
	case 3:
		Query();		//根据 boss编号查询借 服装信息
		cout << "\n" << "\t" << "\t" << "\t" << "\t";
		system("pause");
		VIPInterface();
		break;
	case 4:
		Delete();		//删除 boss函数
		cout << "\n" << "\t" << "\t" << "\t" << "\t";
		system("pause");
		VIPInterface();
		break;
	case 5:
		Index();
		break;
	default:
		cout << "\n" << "\t" << "\t" << "\t" << "\t" << "请输入对应编号" << "\n" << endl;
		cout << "\n" << "\t" << "\t" << "\t" << "\t";
		system("pause");
		VIPInterface();
	}
}

// 服装查询页面
void LookupBookIn() {
for (int i = 0; i < 10; i++)
{
	Sleep(10);
	cout << ".";
	}
	system("cls");
	int i;
	cout << "\n" << "\t" << "\t" << "\t" << "-------------------------------------------------------" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "**********************- 管- 理- 程 -序***************** "<< endl;
	cout << "\t" << "\t" << "\t" << "\t" << "**************************************************" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                          ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****  1、 服装编号查询      2、 服装名查询        ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                          ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****  3、 服装设计师查询      4、 服装品牌查询  ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                          ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****  5、返回上一页        6、返回首页        ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                          ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "**************************************************" << "\n" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "请选择:";
	cin >> i;
	switch (i) {
	case 1:
		LookupNum();	//通过编号查找
		cout << "\n" << "\t" << "\t" << "\t" << "\t";
		system("pause");
		LookupBookIn();
		break;
	case 2:
		LookupBook();	//通过 服装名查找
		cout << "\n" << "\t" << "\t" << "\t" << "\t";
		system("pause");
		LookupBookIn();
		break;
	case 3:
		LookupAuthor();	//通过设计师名查找
		cout << "\n" << "\t" << "\t" << "\t" << "\t";
		system("pause");
		LookupBookIn();
		break;
	case 4:
		LookupPress();	//通过品牌查找
		cout << "\n" << "\t" << "\t" << "\t" << "\t";
		system("pause");
		LookupBookIn();
		break;
	case 5:
		BookInterface();	// 服装管理界面
		break;
	case 6:
		Index();
		break;
	default:
		cout << "\n" << "\t" << "\t" << "\t" << "\t" << "请输入对应编号" << "\n" << endl;
		cout << "\n" << "\t" << "\t" << "\t" << "\t";
		system("pause");
		LookupBookIn();
	}
}

// boss查询页面
void LookupVIPIn() {
	for (int i = 0; i < 10; i++)
{
	Sleep(10);
	cout << ".";
	}
	int i;
	system("cls");
	cout << "\n" << "\t" << "\t" << "\t" << "\t" << "****************************************" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****            服装管理系统         ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****************************************" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****      1、通过编号查找 boss       ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****      2、通过姓名查找 boss       ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****      3、返回上一页             ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****      4、返回首页               ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****************************************" << "\n" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "请选择:";
	cin >> i;
	switch (i) {
	case 1:
		LookupNumVIP();		//按编号查询 boss
		cout << "\n" << "\t" << "\t" << "\t" << "\t";
		system("pause");
		LookupVIPIn();
		break;
	case 2:
		LookupNameVIP();		//按 boss姓名查找 boss
		cout << "\n" << "\t" << "\t" << "\t" << "\t";
		system("pause");
		LookupVIPIn();
		break;
	case 3:
		VIPInterface();	// boss管理界面
		break;
	case 4:
		Index();
		break;
	default:
		cout << "\n" << "\t" << "\t" << "\t" << "\t" << "请输入对应编号" << "\n" << endl;
		cout << "\n" << "\t" << "\t" << "\t" << "\t";
		system("pause");
		LookupVIPIn();
	}
}
//系统管理页面
void BookSysterm() {
	for (int i = 0; i < 10; i++)
{
	Sleep(10);
	cout << ".";
	}
	int i;
	system("cls");
	cout << "\n" << "\t" << "\t" << "\t" << "\t" << "****************************************" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****               系统管理         ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****************************************" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****  1、保存数据      2、打开数据  ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****  3、返回首页                   ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****                                ****" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "****************************************" << "\n" << endl;
	cout << "\t" << "\t" << "\t" << "\t" << "请选择:";
	cin >> i;
	switch (i)
	{
	case 1:
		SaveData();
		
		BookSysterm() ;
		break;
	case 2:
		OpenData();
		print( )  ;
		system("pause");
		BookSysterm() ;
		break; 
	case 3:
		Index();
		break;
	}
}

注意:

文件操作:自己在同一目录下创建一个.txt文件

写入文件

 写出文件

运行效果

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值