#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