Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <string>
- using namespace std;
- int main()
- {
- vector<string*> document;
- string input;
- cin >> input;
- document.push_back(new string(input));
- while(input != "Q")
- {
- cin >> input;
- int docsize = document.size();
- for(int i = 0; i < docsize; i++)
- {
- if(*document[i] == input)
- {
- document.push_back(document[i]);
- break;
- }
- else
- {
- document.push_back(new string(input));
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement