Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <cstdlib>
- #include <string>
- using std::cout;
- using std::cin;
- using std::endl;
- using std::vector;
- using std::string;
- int main(int argc, char** argv){
- vector<string> names;
- names.push_back("5");
- names.push_back("10");
- names.push_back("15");
- string age;
- vector<string>::iterator it;
- cin>>age;
- for(it=names.begin();it < names.end();it++){
- if(*it == age){
- names.erase(it);
- }
- }
- for(it=names.begin();it<names.end();it++){
- cout<<*it<<endl;
- }
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement