Filtering out rude words
Instead of iterating over a vector I'd use std::find().
Even better, instead of std::vector I'd use std::set:

#include &lt;iostream&gt;
#include &lt;set&gt;
#include &lt;string&gt;

using namespace std;

int main(int argc, const char * argv[])
{
    string bad[] = {"poop", "balls"};
    set&lt;string&gt; bad_words(bad, bad + sizeof(bad) / sizeof(string));

    string input;
    while(cin &gt;&gt; input)
    {
        if(bad_words.find(input)!=bad_words.end()){
            cout &lt;&lt; "bleep! ";
        }
        else {
            cout &lt;&lt; input &lt;&lt; " ";
        }
    }
}