博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
习题10.25
阅读量:6538 次
发布时间:2019-06-24

本文共 1515 字,大约阅读时间需要 5 分钟。

hot3.png

#include
#include
#include
#include
#include
using namespace std;int main(){ vector
bookVec; cout<<"***Enter some books you will read in next six month:"<
>book) bookVec.push_back(book); cin.clear(); set
readbook; //the book in "readbook" has already read cout<<"***Enter one book you want to read now(Ctrl+d to end):"<
>bookName) { if(find(bookVec.begin(),bookVec.end(),bookName)==bookVec.end()) { cout<<"***the book "<
<<" is not in your read list,enter again(Ctrl+d to end)!"<
>bookName) if(readbook.count(bookName)) readbook.erase(bookName); else { cout<<"***The book you never select and enter again(Ctrl+d to end):"<
::iterator it=readbook.begin();it!=readbook.end();++it) cout<<*it<<' '; cout<
<<"***the book you have not read are:"<
::iterator it=bookVec.begin();it!=bookVec.end();++it) if(!readbook.count(*it)) cout<<*it<<' '; cout<

 

***Enter some books you will read in next six month:c++compier linuxprogramming datastructure***Enter one book you want to read now(Ctrl+d to end):c++compier***OK, now you want to read :c++compier***Enter one book to read again(Ctrl+d to end):linuxprogramming***OK, now you want to read :linuxprogramming***Enter one book to read again(Ctrl+d to end):***Enter the book you select but not read(Ctrl+d):linuxprogramming***the book you have read are:c++compier ***the book you have not read are:linuxprogramming datastructure

转载于:https://my.oschina.net/ppppower/blog/36909

你可能感兴趣的文章
四种方法校验数组中是否包含某个指定的字符串
查看>>
29、Java并发性和多线程-非阻塞算法
查看>>
安装OpenResty开发环境
查看>>
第0课 从0开始
查看>>
hadoop无法启动DataNode问题
查看>>
java泛型中<?>和<T>区别
查看>>
这里是指推送通知跟NSNotification有区别:
查看>>
Linux中断(interrupt)子系统之一:中断系统基本原理【转】
查看>>
用户ID的代码生成
查看>>
win7经常出现“关闭xxxx前您必须关闭所有会话框”
查看>>
SNMP安全配置的两种方法(也可同一时候兼顾配置两种方法)
查看>>
react-native 常见操作 及 git 补充
查看>>
MongoDB 自己定义函数
查看>>
Summary Day30
查看>>
逆向输出回环数组
查看>>
自己动手,实现“你的名字”滤镜
查看>>
高清摄像头MIPI CSI2接口浅解【转】
查看>>
C# CancellationTokenSource和CancellationToken的实现
查看>>
PCIE BAR空间
查看>>
winform命名规范
查看>>