title: C++ Vector troubles
body: <p>Heres a function of my program, which keeps crashing. The purpose of the function is the search through the vectors and display what they rank and the frequency, which is read into thier respective vectors. Im guessing its my while loop but im not sure.
  The vectors are correctly read in.</p>
  
  <pre><code>void searchNames(vector&lt;string&gt; girlsname,vector&lt;int&gt; girlsfeq,vector&lt;string&gt; boysname,vector&lt;int&gt; boysfeq){
      string name1;
      string name;
      int SIZE = girlsname.size();
      int SIZE2 = boysname.size();
      while(name1 != "quit"){
          int i=0;
          int frank=find(girlsname.begin(), girlsname.end(), name1) - girlsname.begin();
          int mrank=find(boysname.begin(), boysname.end(), name1) - boysname.begin();
          name1.clear();
          name.clear();
          cout &lt;&lt; "Please enter a name: ";
          cin &gt;&gt; name1;
          cout &lt;&lt; endl;
          while(i&lt; SIZE &amp;&amp; name1 !=girlsname[i++]){
  
         frank++;
  
          }
          name.clear();
          i=0;
          while(i&lt; SIZE2 &amp;&amp; name1 !=boysname[i++]){
  
          mrank++;
  
          }
          cout &lt;&lt; left &lt;&lt; setw(15) &lt;&lt; "Name" &lt;&lt; right &lt;&lt; setw(10) &lt;&lt; "Girl Rank" &lt;&lt; right &lt;&lt; setw(10) &lt;&lt; "Frequency" &lt;&lt; right &lt;&lt; setw(10) &lt;&lt; "Boy Rank"&lt;&lt; right &lt;&lt; setw(10) &lt;&lt; "Frequency" &lt;&lt; endl;
          if(frank != SIZE &amp;&amp; mrank != SIZE2){
          cout &lt;&lt; left &lt;&lt; setw(15) &lt;&lt; name1 &lt;&lt; right &lt;&lt; setw(10) &lt;&lt; frank &lt;&lt; right &lt;&lt; setw(10) &lt;&lt; girlsfeq[frank] &lt;&lt; right &lt;&lt; setw(10) &lt;&lt; mrank &lt;&lt; right &lt;&lt; setw(10) &lt;&lt; boysfeq[mrank] &lt;&lt; endl;
  } 
  
  }
  </code></pre>