最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

C++實(shí)現(xiàn)小型圖書(shū)管理系統(tǒng)

 更新時(shí)間:2022年03月12日 10:03:36   作者:GroovRain  
這篇文章主要為大家詳細(xì)介紹了C++實(shí)現(xiàn)小型圖書(shū)管理系統(tǒng),文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

本文實(shí)例為大家分享了C++實(shí)現(xiàn)小型圖書(shū)管理系統(tǒng)的具體代碼,供大家參考,具體內(nèi)容如下

因?yàn)檎n程設(shè)計(jì)的原因,需要實(shí)現(xiàn)一個(gè)小型圖書(shū)管理系統(tǒng)

包含功能:

問(wèn)題描述:

設(shè)計(jì)一個(gè)系統(tǒng),對(duì)圖書(shū)信息進(jìn)行管理,信息描述:有關(guān)該系統(tǒng)基本信息的描述,如:圖書(shū)名稱(chēng)、圖書(shū)編號(hào)、單價(jià)、作者、存在狀態(tài)、借書(shū)人姓名、性別、學(xué)號(hào)等。

基本要求:

基本功能:

1、新進(jìn)圖書(shū)基本信息的輸入。
2、圖書(shū)基本信息的查詢。
3、對(duì)撤消圖書(shū)信息的刪除。
4、為借書(shū)人辦理注冊(cè)。
5、辦理借書(shū)手續(xù)(非注冊(cè)會(huì)員不能借書(shū))。
6、辦理還書(shū)手續(xù)。
7、統(tǒng)計(jì)圖書(shū)庫(kù)存、已借出圖書(shū)數(shù)量。

需要?jiǎng)?chuàng)建三個(gè)文本文件:record.txt  book.txt reader.txt

operating.h的頭文件:

#include <iostream>
#include <fstream>
#include <string>
#include <time.h>?
#include<sstream>
#include<vector>
#include <iomanip>
?
using namespace std;
?
?
int all_stock = 0;
int out_stock = 0;
int times=0;
void outData(vector<string> res,int n) ?// n為txt中 每行數(shù)據(jù)個(gè)數(shù)
{
?? ?for(int i=0;i<res.size();i+=n){
?? ??? ?for(int j=0;j<n;j++)
?? ??? ??? ?cout<<setw(12)<<res[i+j]<<" ";
?? ??? ?
?? ??? ?cout<<endl;
? ? }
}
?
void BookEntry()
{
?? ?double price;
?? ?string bookname,writer;
?? ?fstream out;
?? ?out.open("book.txt",ios::app);
?? ?if(!out)
?? ?{
?? ??? ?cerr<<"打開(kāi)文件失敗!"<<endl;
?? ?}
?
?? ?time_t tt = time(NULL);//這句返回的只是一個(gè)時(shí)間cuo
?? ?
?? ?cout<<"請(qǐng)輸入書(shū)籍名稱(chēng)"<<endl;
?? ?cin>>bookname;
?? ?cout<<"請(qǐng)輸入書(shū)籍作者"<<endl;
?? ?cin>>writer;
?? ?cout<<"請(qǐng)輸入書(shū)籍價(jià)格"<<endl;
?
?
?? ?while(! (cin>>price) ?|| price <= 0 )
?? ?{
?? ??? ?cin.clear();
?? ??? ?cin.ignore(100,'\n');
?? ??? ?cout<<"請(qǐng)輸入正確的價(jià)格"<<endl;
?? ?}
?? ?
?? ?out<<tt<<" "<<bookname<<" "<<writer<<" "<<price<<" "<<"0"<<"\n";
?? ?
?? ?out.close();
?? ?
}
?
?
void BookMes()
{
?? ?fstream in;
?? ?string line;
?? ?//用于存放分割后的字符串?
? ? vector<string> res;
?? ?string temp; //暫存字符串
? ??
?? ?in.open("book.txt",ios::in);
?? ?if(!in)
?? ?{
?? ??? ?cerr<<"打開(kāi)文件失敗!"<<endl;
?? ?}
?? ?all_stock = 0;
?? ?while(getline(in,line))
?? ?{
?? ??? ?all_stock++;
?? ??? ?//cout<<line<<endl;
?? ??? ?//將字符串讀到input中?
?? ??? ?stringstream input(line); //將line切割 通過(guò)input存入temp,然后存入res中
?? ??? ?while(input>>temp)
?? ??? ?{
?? ??? ??? ?
?? ??? ??? ?res.push_back(temp);
?? ??? ?}
?? ?}
?? ?// 0 書(shū)籍編號(hào) 1 書(shū)籍名稱(chēng) 2作者 3價(jià)格 4書(shū)籍狀態(tài)
? ? //輸出res?
?? ?cout<<endl<<setw(12)<<"書(shū)籍編號(hào)"<<" "<<setw(12)<<"書(shū)籍名稱(chēng)"<<" "<<setw(12)<<"作者"<<" "<<setw(12)<<"價(jià)格"<<" "<<setw(12)<<"在館0,不在1"<<"\n";
? ? outData(res,5);
?? ?in.close();
}
?
?
void DelBook()
{
?? ?string del_book;
?? ?string line;
?? ?vector<string>res;
?? ?string temp;
?? ?bool flag=false;
?
?
?? ?fstream in;
?? ?in.open("book.txt",ios::in);
?? ?if(!in)
?? ?{
?? ??? ?cerr<<"打開(kāi)錯(cuò)誤文件"<<endl;
?? ?}
?
?
?? ?cout<<"請(qǐng)輸入需要?jiǎng)h除的圖書(shū)ID"<<endl;
?? ?cin>>del_book;
?? ?
? ? ? ? while(getline(in,line))
?? ?{
?? ??? ?//cout<<line<<endl;
?? ??? ?//將字符串讀到input中?
?? ??? ?stringstream input(line); //將line切割 通過(guò)input存入temp,然后存入res中
?? ??? ?times=0;
?? ??? ?while(input>>temp)
?? ??? ?{
?? ??? ??? ?if(del_book == temp && times==0)
?? ??? ??? ?{
?? ??? ??? ??? ?
?? ??? ??? ??? ?for(int i=0;i<3;i++) ?//因?yàn)橐还参鍌€(gè) 第一個(gè)temp已經(jīng)是del_book 所以這里取得是四個(gè)
?? ??? ??? ??? ?{
?? ??? ??? ??? ??? ?input>>temp;
?? ??? ??? ??? ?}
?? ??? ??? ??? ?input>>temp;
?? ??? ??? ??? ?if(temp != "0")
?? ??? ??? ??? ?{
?? ??? ??? ??? ??? ?cout<<"書(shū)籍狀態(tài)不對(duì)";
?? ??? ??? ??? ??? ?in.close();
?? ??? ??? ??? ??? ?return ;
?? ??? ??? ??? ?}
?? ??? ??? ??? ?flag=true;
?? ??? ??? ??? ?cout<<"\n找到了喔,應(yīng)該刪除成功了\n";
?? ??? ??? ??? ?continue;
?? ??? ??? ?}
?? ??? ??? ?res.push_back(temp);
?? ??? ??? ?times++;
?? ??? ??? ?
?? ??? ?}
?? ?}
?? ?
?? ?//outData(res,5);
?? ?in.close();
?? ?
?? ?if(!flag)
?? ?{
?? ??? ?cout<<"\n錯(cuò)誤的書(shū)籍ID\n";
?? ??? ?return ;
?? ?}
?? ?fstream out;
?
?
?? ?out.open("book.txt",ios::out);
?? ?if(!out)
?? ?{
?? ??? ?cerr<<"打開(kāi)文件失敗!"<<endl;
?? ?}
?? ?
?? ?for(int j=0;j<res.size();j+=5)
?? ?{
?? ??? ?line = res[j] + " " + res[j+1] + " " + res[j+2] + " " + res[j+3] + " " + res[j+4] + "\n";
?? ??? ?out<<line;
?? ?}
?? ?out.close();
?? ?
}

void ReaderEntry()
{
?? ?
?? ?string readername,sex_str;
?? ?int sex;
?? ?fstream out;
?
?
?? ?out.open("reader.txt",ios::app);
?? ?if(!out)
?? ?{
?? ??? ?cerr<<"打開(kāi)文件失敗!"<<endl;
?? ?}

?? ?time_t readerid = time(NULL);//這句返回的只是一個(gè)時(shí)間cuo
?? ?
?? ?cout<<"請(qǐng)輸入讀者姓名"<<endl;
?? ?cin>>readername;
?? ?
?? ?do
?? ?{
?? ??? ?cout<<"請(qǐng)輸入讀者性別:0為女,1為男"<<endl;
?? ??? ?while(! (cin>>sex) )
?? ??? ?{
?? ??? ??? ?cin.clear();
?? ??? ??? ?cin.ignore(100,'\n');
?? ??? ??? ?cout<<"請(qǐng)輸入正確的0或1"<<endl;
?? ??? ?}
?? ?}while(sex != 0 && sex!=1);
?
?
?? ?if(sex == 1)
?? ?{
?? ??? ?sex_str = "男";
?? ?}else if (sex == 0){
?? ??? ?sex_str = "女";
?? ?}else{
?? ??? ?out.close();
?? ??? ?return ;
?? ?}

?? ?out<<readerid<<" "<<readername<<" "<<sex_str<<"\n";
?? ?
?? ?out.close();
?? ?
}
/*讀者信息*/
void ReaderMes()
{
?? ?fstream in;
?? ?string line;
?? ?//用于存放分割后的字符串?
? ? vector<string> res;
?? ?string temp; //暫存字符串
?? ?in.open("reader.txt",ios::in);
?? ?if(!in)
?? ?{
?? ??? ?cerr<<"打開(kāi)文件失敗!"<<endl;
?? ?}
?? ?
?? ?while(getline(in,line))
?? ?{
?? ??? ?//cout<<line<<endl;
?? ??? ?//將字符串讀到input中?
?? ??? ?stringstream input(line); //將line切割 通過(guò)input存入temp,然后存入res中
?? ??? ?while(input>>temp)
? ? ? ? res.push_back(temp);
?? ?}
?? ?// 0讀者學(xué)號(hào) 1讀者姓名 2讀者性別
? ? //輸出res?
?? ?cout<<endl<<setw(12)<<"讀者編號(hào)"<<" "<<setw(12)<<"讀者"<<" "<<setw(12)<<"性別"<<"\n";
? ? outData(res,3);
?? ?in.close();
}

?
/* 借閱書(shū)籍 */
void BorrowBook()
{
?? ?string book[5];
?? ?string readerid;
?? ?string readername;
?? ?string line;
?? ?vector<string>res; //取書(shū)籍狀況,并且更新
?
?
?? ?string temp;
?? ?bool flag_book = false; //用于判斷書(shū)籍是否存在 ?讀者是否存在
?? ?bool flag_reader = false;
?
?
?? ?/* 取book的圖書(shū)情況,并判斷是否在館*/
?? ?fstream in;
?? ?in.open("book.txt",ios::in);
?? ?if(!in)
?? ?{
?? ??? ?cerr<<"打開(kāi)錯(cuò)誤文件"<<endl;
?? ?}

?? ?cout<<"請(qǐng)輸入需要借的圖書(shū)ID"<<endl;
?? ?cin>>book[0];
?? ?
?? ?while(getline(in,line))
?? ?{
?? ??? ?//cout<<line<<endl;
?? ??? ?//將字符串讀到input中?
?? ??? ?stringstream input(line); //將line切割 通過(guò)input存入temp,然后存入res中
?? ??? ?times=0;
?? ??? ?while(input>>temp)
?? ??? ?{
?? ??? ??? ?if(book[0] == temp && times ==0)
?? ??? ??? ?{
?? ??? ??? ??? ?res.push_back(temp);
?? ??? ??? ??? ?for(int i=0;i<3;i++) ?//從書(shū)籍名稱(chēng)開(kāi)始取,一直取到價(jià)錢(qián)
?? ??? ??? ??? ?{
?? ??? ??? ??? ??? ?input>>temp; //讀取了書(shū)籍編號(hào),要及時(shí)寫(xiě)入res,以后要寫(xiě)進(jìn)文本
?? ??? ??? ??? ??? ?book[1+i]=temp;
?? ??? ??? ??? ??? ?res.push_back(temp);
?? ??? ??? ??? ?}
?? ??? ??? ??? ?input>>temp; ?//取書(shū)籍狀態(tài),如果0在館 如果1不在館
?? ??? ??? ??? ?if(temp == "0")
?? ??? ??? ??? ?{
?? ??? ??? ??? ??? ?book[4]="1";
?? ??? ??? ??? ??? ?temp="1";
?? ??? ??? ??? ??? ?res.push_back(temp);
?? ??? ??? ??? ??? ?flag_book=true;
?? ??? ??? ??? ?}else{
?? ??? ??? ??? ??? ?cout<<"\n書(shū)籍不在館\n";
?? ??? ??? ??? ??? ?in.close();
?? ??? ??? ??? ??? ?return ;
?? ??? ??? ??? ?}
?? ??? ??? ??? ?continue; ?//繼續(xù)取
?? ??? ??? ?}
?? ??? ??? ?res.push_back(temp);
?? ??? ??? ?times++;
?? ??? ??? ?
?? ??? ?}
?? ?}

?? ?in.close();
?? ?if(!flag_book)
?? ?{
?? ??? ?cout<<"錯(cuò)誤的書(shū)籍ID"<<endl;
?? ??? ?return ;
?? ?}
?? ?
?? ?in.open("reader.txt",ios::in);
?? ?if(!in)
?? ?{
?? ??? ?cerr<<"打開(kāi)錯(cuò)誤文件"<<endl;
?? ?}
?? ?cout<<"\n請(qǐng)輸入讀者ID\n";
?? ?cin>>readerid;
?
?
?? ?while(getline(in,line))
?? ?{
?? ??? ?//cout<<line<<endl;
?? ??? ?//將字符串讀到input中?
?? ??? ?stringstream input(line); //將line切割 通過(guò)input存入temp,然后存入res中
?? ??? ?times=0;
?? ??? ?while(input>>temp)
?? ??? ?{
?? ??? ??? ?if(readerid == temp && times==0)
?? ??? ??? ?{
?? ??? ??? ??? ?input>>temp;
?? ??? ??? ??? ?readername=temp;
?? ??? ??? ??? ?flag_reader=true;
?? ??? ??? ??? ?break;
?
?
?? ??? ??? ?}
?? ??? ??? ?times++;
?? ??? ??? ?
?? ??? ?}
?? ?}
?? ?if(!flag_reader)
?? ?{
?? ??? ?cout<<"錯(cuò)誤的讀者ID"<<endl;
?? ??? ?in.close();
?? ??? ?return ;
?? ?}
?
?? ?in.close();
?? ? ??
?? ?fstream out;
?? ?out.open("record.txt",ios::app);
?? ?if(!out)
?? ?{
?? ??? ?cerr<<"打開(kāi)錯(cuò)誤文件"<<endl;
?? ?}
?? ?line = book[0] + " " + book[1] + " " + readername + '\n';
?? ?out<<line;
?? ?cout<<"\n辦理借書(shū)成功\n";
?? ?out.close();
?? ?out.open("book.txt",ios::out);
?? ?if(!out)
?? ?{
?? ??? ?cerr<<"打開(kāi)文件失敗!"<<endl;
?? ?}
?? ?
?? ?for(int j=0;j<res.size();j+=5)
?? ?{
?? ??? ?line = res[j] + " " + res[j+1] + " " + res[j+2] + " " + res[j+3] + " " + res[j+4] + "\n";
?? ??? ?out<<line;
?? ?}
?? ?out.close();
}
?
void BorrowMes()
{
?? ?fstream in;
?? ?string line;
?? ?//用于存放分割后的字符串?
? ? vector<string> res;
?? ?string temp; //暫存字符串
? ? in.open("record.txt",ios::in);
?? ?if(!in)
?? ?{
?? ??? ?cerr<<"打開(kāi)文件失敗!"<<endl;
?? ?}
?? ?out_stock=0;
?? ?while(getline(in,line))
?? ?{
?? ??? ?out_stock++;
?? ??? ?//cout<<line<<endl;
?? ??? ?//將字符串讀到input中?
?? ??? ?stringstream input(line); //將line切割 通過(guò)input存入temp,然后存入res中
?? ??? ?while(input>>temp)
? ? ? ? res.push_back(temp);
?? ?}
?? ?// 0書(shū)籍編號(hào) 1書(shū)籍名稱(chēng) 2讀者姓名
? ? //輸出res?
?? ?cout<<endl<<setw(12)<<"書(shū)籍編號(hào)"<<" "<<setw(12)<<"書(shū)籍名稱(chēng)"<<" "<<setw(12)<<"讀者"<<"\n";
? ? outData(res,3);
?? ?
?? ?in.close();
}
?
void RtnBook()
{
?? ?string rtn_book;
?? ?string line;
?? ?vector<string>res;
?? ?string temp;
?? ?bool flag=false;
?
?
?? ?fstream in;
?? ?in.open("record.txt",ios::in); ?//先打開(kāi)record 查看是否有借這本書(shū)
?? ?if(!in)
?? ?{
?? ??? ?cerr<<"打開(kāi)錯(cuò)誤文件"<<endl;
?? ?}

?? ?cout<<"請(qǐng)輸入需要?dú)w還的書(shū)籍ID"<<endl;
?? ?cin>> rtn_book;
?? ??? ?
?? ?while(getline(in,line))
?? ?{
?? ??? ?//cout<<line<<endl;
?? ??? ?//將字符串讀到input中?
?? ??? ?stringstream input(line); //將line切割 通過(guò)input存入temp,然后存入res中
?? ??? ?times=0;
?? ??? ?while(input>>temp)
?? ??? ?{
?? ??? ??? ?if(rtn_book == temp && times==0) //如果有的話
?? ??? ??? ?{
?? ??? ??? ??? ?flag=true;
?? ??? ??? ??? ?
?? ??? ??? ??? ?for(int i=0;i<2;i++) ?//因?yàn)橐还踩齻€(gè) 第一個(gè)temp已經(jīng)是del_book 所以這里取得是兩個(gè)
?? ??? ??? ??? ?{
?? ??? ??? ??? ??? ?input>>temp;// 將刪除的東西不輸出到向量中
?? ??? ??? ??? ?}
?? ??? ??? ??? ?continue;
?? ??? ??? ?}
?? ??? ??? ?res.push_back(temp);
?? ??? ??? ?times++;
?? ??? ??? ?
?? ??? ?}
?? ?}
?? ?
?? ?//outData(res,3);
?? ?in.close();
?? ?if(!flag)
?? ?{
?? ??? ?cout<<"該圖書(shū)不存在或者沒(méi)有被外借"<<endl;
?? ??? ?return ;
?? ?}
?
?? ?fstream out;
?
?? ?out.open("record.txt",ios::out); //record已經(jīng)刪除成功
?? ?if(!out)
?? ?{
?? ??? ?cerr<<"打開(kāi)文件失敗!"<<endl;
?? ?}
?? ?
?? ?for(int j=0;j<res.size();j+=3)
?? ?{
?? ??? ?line = res[j] + " " + res[j+1] + " " + res[j+2] ?+ "\n";
?? ??? ?out<<line;
?? ?}
?? ?out.close();
?
?? ?vector<string>res_book;

?? ?in.open("book.txt",ios::in); //開(kāi)始取 被修改的書(shū)籍
?? ?if(!in)
?? ?{
?? ??? ?cerr<<"打開(kāi)錯(cuò)誤文件"<<endl;
?? ?}?? ?
?? ?
?? ?while(getline(in,line))
?? ?{
?? ??? ?//cout<<line<<endl;
?? ??? ?//將字符串讀到input中?
?? ??? ?stringstream input(line); //將line切割 通過(guò)input存入temp,然后存入res中
?? ??? ?times=0;
?? ??? ?while(input>>temp)
?? ??? ?{
?? ??? ??? ?if(rtn_book == temp && times==0)
?? ??? ??? ?{
?? ??? ??? ??? ?res_book.push_back(temp);
?? ??? ??? ??? ?for(int i=0;i<3;i++) ?//因?yàn)橐还参鍌€(gè) 第一個(gè)temp已經(jīng)是rtn_book 所以這里取得是四個(gè)
?? ??? ??? ??? ?{
?? ??? ??? ??? ??? ?input>>temp;
?? ??? ??? ??? ??? ?res_book.push_back(temp);
?? ??? ??? ??? ?}
?? ??? ??? ??? ?input>>temp;//最后一個(gè)取得是書(shū)籍狀態(tài),需要修改書(shū)籍狀態(tài)
?? ??? ??? ??? ?temp = "0";
?? ??? ??? ??? ?res_book.push_back(temp);
?? ??? ??? ??? ?continue;
?? ??? ??? ?}
?? ??? ??? ?res_book.push_back(temp);
?? ??? ??? ?times++;
?? ??? ?}
?? ?}
?? ?
?? ?//outData(res,5);
?? ?in.close();
?? ?
?? ?out.open("book.txt",ios::out); //再存入文本中;
?? ?if(!out)
?? ?{
?? ??? ?cerr<<"打開(kāi)文件失敗!"<<endl;
?? ?}
?? ?
?? ?for(int j=0;j<res_book.size();j+=5)
?? ?{
?? ??? ?line = res_book[j] + " " + res_book[j+1] + " " + res_book[j+2] + " " + res_book[j+3] + " " + res_book[j+4] + "\n";
?? ??? ?out<<line;
?? ?}
?? ?out.close();
?
?
?? ?cout<<"\n找到了喔,應(yīng)該還書(shū)成功了\n";
}
?
?
void CountBook()
{?? ?
?? ?cout<<"\n圖書(shū)館書(shū)籍情況";
?? ?BookMes();
?? ?cout<<"圖書(shū)館一共有:"<<all_stock<<" 本書(shū)\n\n\n";
?? ?cout<<"\n圖書(shū)館書(shū)籍外借情況";
?? ?BorrowMes();
?? ?cout<<"圖書(shū)館目前外借:"<<out_stock<<" 本書(shū)\n\n";
?? ?cout<<"\n\n圖書(shū)館當(dāng)前在館書(shū)籍還有:"<<all_stock - out_stock<<" 本書(shū)\n";
}

main.cpp的主函數(shù)

#include "operating.h"
?
int main()
{
?? ?int order;
?? ?do
?? ?{
?? ??? ?order = -1;
?? ??? ?cout<<"\n";
?? ??? ?cout<<"----------------------------------------------------------\n";
?? ??? ?cout<<"| 1. 圖書(shū)信息錄入 ? ?2. 圖書(shū)信息查詢 ? ?3. 圖書(shū)信息刪除 ?|\n";
?? ??? ?cout<<"| 4. 讀者辦理注冊(cè) ? ?5. 讀者信息查詢 ? ?6. 辦理借書(shū)手續(xù) ?|\n";
?? ??? ?cout<<"| 7. 辦理還書(shū)手續(xù) ? ?8 ?已借出圖書(shū) ? ? ?9.統(tǒng)計(jì)圖書(shū)庫(kù)存 ?|\n";
?? ??? ?cout<<"| ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??? ?按 \"0\"退出 ? ?|\n";
?? ??? ?cout<<"----------------------------------------------------------\n";
?? ??? ?cout<<" ?請(qǐng)輸入相應(yīng)序號(hào)進(jìn)行相應(yīng)操作:";
?? ??? ?cin>>order;
?? ??? ?cin.clear();//清除緩沖區(qū)中后面的字符
?? ??? ?cin.ignore(100,'\n');
?
?? ??? ?switch(order)
?? ??? ?{
?? ??? ?case 1:
?? ??? ??? ?BookEntry();
?? ??? ??? ?break;
?? ??? ?case 2:
?? ??? ??? ?BookMes();
?? ??? ??? ?break;
?? ??? ?case 3:
?? ??? ??? ?DelBook();
?? ??? ??? ?break;
?? ??? ?case 4:
?? ??? ??? ?ReaderEntry();
?? ??? ??? ?break;
?? ??? ?case 5:
?? ??? ??? ?ReaderMes();
?? ??? ??? ?break;
?? ??? ?case 6:
?? ??? ??? ?BorrowBook();
?? ??? ??? ?break;
?? ??? ?case 7:
?? ??? ??? ?RtnBook();
?? ??? ??? ?break;
?? ??? ?case 8:
?? ??? ??? ?BorrowMes();
?? ??? ??? ?break;
?? ??? ?case 9:
?? ??? ??? ?CountBook();
?? ??? ??? ?break;
?? ??? ?case 0:
?? ??? ??? ?break;
?? ??? ?default:
?? ??? ??? ?cout<<"錯(cuò)誤的命令行"<<endl;
?? ??? ??? ?break;
?? ??? ?}
?? ??? ?
?? ?}while(order != 0);
?
?? ?system("pause");
?? ?return 0;
?
?? ?
}

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • C語(yǔ)言實(shí)現(xiàn)掃雷經(jīng)典游戲

    C語(yǔ)言實(shí)現(xiàn)掃雷經(jīng)典游戲

    這篇文章主要為大家詳細(xì)介紹了C語(yǔ)言實(shí)現(xiàn)掃雷經(jīng)典游戲,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2021-07-07
  • OnSize、OnSizing和OnGetMinMaxInfo區(qū)別分析

    OnSize、OnSizing和OnGetMinMaxInfo區(qū)別分析

    這篇文章主要介紹了OnSize、OnSizing和OnGetMinMaxInfo區(qū)別分析,需要的朋友可以參考下
    2015-01-01
  • C語(yǔ)言深入探究函數(shù)的溯源

    C語(yǔ)言深入探究函數(shù)的溯源

    函數(shù)是一組一起執(zhí)行一個(gè)任務(wù)的語(yǔ)句。每個(gè) C 程序都至少有一個(gè)函數(shù),即主函數(shù) main() ,所有簡(jiǎn)單的程序都可以定義其他額外的函數(shù)
    2022-04-04
  • C++字符串的截取問(wèn)題

    C++字符串的截取問(wèn)題

    這篇文章主要介紹了C++字符串的截取問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2023-08-08
  • C++實(shí)現(xiàn)LeetCode(140.拆分詞句之二)

    C++實(shí)現(xiàn)LeetCode(140.拆分詞句之二)

    這篇文章主要介紹了C++實(shí)現(xiàn)LeetCode(140.拆分詞句之二),本篇文章通過(guò)簡(jiǎn)要的案例,講解了該項(xiàng)技術(shù)的了解與使用,以下就是詳細(xì)內(nèi)容,需要的朋友可以參考下
    2021-07-07
  • 詳解如何在VS2019和VScode中配置C++調(diào)用python接口

    詳解如何在VS2019和VScode中配置C++調(diào)用python接口

    這篇文章主要介紹了詳解如何在VS2019和VScode中配置C++調(diào)用python接口,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2020-12-12
  • C++實(shí)例輸入多行數(shù)字到數(shù)組

    C++實(shí)例輸入多行數(shù)字到數(shù)組

    這篇文章主要介紹了C++實(shí)例輸入多行數(shù)字到數(shù)組的相關(guān)資料,這里提供實(shí)例代碼幫助大家學(xué)習(xí)理解,需要的朋友可以參考下
    2016-12-12
  • C++實(shí)現(xiàn)簡(jiǎn)易版掃雷游戲

    C++實(shí)現(xiàn)簡(jiǎn)易版掃雷游戲

    大家好,本篇文章主要講的是C++實(shí)現(xiàn)簡(jiǎn)易版掃雷游戲,感興趣的同學(xué)趕快來(lái)看一看吧,對(duì)你有幫助的話記得收藏一下
    2022-01-01
  • C++的對(duì)象特性和友元你真的了解嗎

    C++的對(duì)象特性和友元你真的了解嗎

    這篇文章主要為大家詳細(xì)介紹了C++的對(duì)象特性和友元,使用數(shù)據(jù)庫(kù),文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2022-02-02
  • C語(yǔ)言中獲取和改變目錄的相關(guān)函數(shù)總結(jié)

    C語(yǔ)言中獲取和改變目錄的相關(guān)函數(shù)總結(jié)

    這篇文章主要介紹了C語(yǔ)言中獲取和改變目錄的相關(guān)函數(shù)總結(jié),包括getcwd()函數(shù)和chdir()函數(shù)以及chroot()函數(shù)的使用方法,需要的朋友可以參考下
    2015-09-09

最新評(píng)論

静宁县| 陇川县| 施秉县| 乐都县| 武夷山市| 余姚市| 天津市| 柳江县| 延川县| 四平市| 云和县| 嘉鱼县| 大悟县| 万源市| 广河县| 木里| 聂荣县| 滦平县| 阿坝| 安多县| 宁明县| 平和县| 上思县| 华容县| 新干县| 浑源县| 西宁市| 镇江市| 明溪县| 互助| 灵山县| 图片| 宝应县| 民和| 孟津县| 靖宇县| 商南县| 扶余县| 伊川县| 公安县| 开平市|