check for existing record
<pre><code>class Catalog  {


bool BookCopy;

public:
string BookTitle;
Catalog()
{

  BookCopy = false;

}

Catalog(string Title, bool Copy)
{
BookTitle = Title; 
BookCopy = Copy;
 }


void SetTitle(string Title)  {BookTitle = Title; }

void SetBookCopy(bool Copy) {BookCopy = Copy; }

string GetTitle()    { return BookTitle; }

bool GetCopy() { return BookCopy; }

};

class BookList  { 
     vector&lt;Catalog&gt; List;  
 vector&lt;Catalog&gt;::iterator Transit;




public: 


 void Fill(); 

 void Show(); 


}; 

 void BookList::Fill()   //Create book record
  { 
string Title;
    bool Copy;


Catalog Buffer;

cout &lt;&lt; "Enter book information, Stop To quit" &lt;&lt; endl; 
cout &lt;&lt; "-------------------------- " &lt;&lt; endl;
while(true)
{ 
     cout &lt;&lt; "Title: "; 
     getline(cin, Title); 
     if(Title == "Stop") 
     break;

     for(Transit = List.begin() ; Transit != List.end() ; Transit++ ) {
    if(Transit-&gt;GetTitle() == Title) {
      Copy = true;
     }
      else 
       Copy = false;
    }
</code></pre>

<p>I want to check if an identical title exists when making a new record.  If it exists then to assign 1 to Copy otherwise leave it as 0.  When I make a record with an identical title 1 does not get assigned to copy.</p>
