Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<string>
- #include<vector>
- #include<algorithm>
- #include<cmath>
- using namespace std;
- inline void keep_window_open() { char ch; cin >> ch; }
- int main()
- {
- string bad_word = "broccoli";
- cout << "type words\n";
- vector <string> words;
- for (string temp; cin >> temp; )
- words.push_back(temp);
- cout << "just stuff";
- cout << "so far we have " << words.size() << " words in vector 'words'.\n";
- for (string word : words) {
- if (word != bad_word)
- cout << word;
- else
- cout << "BLEEP";
- }
- keep_window_open();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement