Vector comparison in C++ without set_intersection or set_difference : <p>just a novice learning C++. It's a great language with a steep learning curve and I am climbing that mountain. </p>

<p>Currently, I want to compare two vector, the first vector already has predefined elements, while the other vector's elements are inputted on the go (i.e. "cin in a while loop"). The output of the vector comparison should be a string, "bleep", whenever similar strings are matched between the two sorted vectors. Else, the vector with the inputted words will print out it's elements.</p>

<p>Side Note: The code is a bit religious (I decided to use a standard text that I know - the Bible). So I am not trying to condemn anyone I just needed a standard text we all have access to. Also, I have searched online and some suggestions for comparing vectors required that I used set_difference, set_intersection etc. I have checked them out, but I realised that it will take a novice like me more time to understand the interator syntax. So that is why I am here.</p>

<p>So please I need your help because the code keeps giving this error from the implementation file:
<a href="https://i.stack.imgur.com/O9juM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/O9juM.jpg" alt="enter image description here"></a></p>

<p>I know. I wish i could solve the error (Error's are actually the topic for the next chapter in the book I am reading)</p>

<p>So enough small talk here is the code I have been working on. Any pointers will be appreciated. Thanks in advance:)</p>

<pre><code>#include "stdafx.h"
#include "Std_lib_facilities.h"
int main()
{
    // Introduction

    cout &lt;&lt; "This program will compare the your input to already predefined works which are found in Galatians 5:19-24.";

    // Vectors of disliked by God in Galatians 5:19-24. These are the works of the flesh. And I copied them from the Bible.
    // Side comment:I know we are all sinners- I am not judging anyone. I  myself am working on some with the help of the Holy Spirit and my spirit is getting stronger everyday.

    vector &lt;string&gt; disliked; disliked[0]= "hatred"; disliked[1] = "envy"; disliked[2] = "adultery"; disliked[3] = "fornication"; disliked[4] = "anger"; disliked[5] = "malice"; 
    disliked[6] = "gluttony"; disliked[7] = "lying"; disliked[8] = "stealing"; disliked[9] = "greed"; disliked[10] = "uncleanliness"; disliked[11] = "lewdness"; disliked[12] = "idolatry";
    disliked[13] = "sorcery"; disliked[14] = "contentions"; disliked[15] = "jealousy"; disliked[16] = "selfish ambition"; disliked[17] = "dissensions"; disliked[18] = "heresies";
    disliked[19] = "murder"; disliked[20] = "drunkeness"; disliked[21] = "revelries";

    // Sorted the vectors so that they could be compared with what are liked.
    sort(disliked.begin(), disliked.end());

    cout &lt;&lt; "Please enter the fruits of the Holy Spirit in Galatians 5:22-23, while purposely adding some of the works of the flesh which are found in Galatians 5:19-24: \n" &lt;&lt;
        "Also inset a Ctrl+Z and click enter when you have finished inserting the works"&lt;&lt; endl;

    string first_input; // String for the input of the likes. Please, you are to purposely insert some words that are not listed in Galatians 5:22-23. Rather include some from Galatians 5:19-24
    vector &lt;string&gt; liked; // Vector of liked qualities

    while (cin &gt;&gt; first_input) // cin iostream is used to insert the whitespace separated strings into first_input
        liked.push_back(first_input); // push_back inserts the strings from first_input into the vector liked
        sort(liked.begin(), liked.end()); // the vector liked is sorted.

        for (int i = 0; i &lt; liked.size(); ++i) // Using the loop for the comparison of the sorted vectors in the next if statment
            if (disliked == liked) // if strings are similar give a bleep!
                cout &lt;&lt; "Bleep!" &lt;&lt; endl;
            else
                cout &lt;&lt; liked[i]; // if strings are not similar cout the list of liked qualities.


}
</code></pre>
