title: matching elements in a vector
body: <p>What i want to do is to match allow user to enter for example ID and match that ID with some vector and print it. Here is how my class looks like. (I am trying to do an inventory program).</p>
  
  <pre><code>class Item{
  private:
    string month;
    string name;
    int ID;
    int actual_qunatity;
  
  public:
    void print()const;
    void report();
    void getdata();
    void setname (string itemname){name=itemname;}
    void setID(int setID){ID=setID;}
  };
  class Inventory{
  public:
    void print2()const;
    void report();
    void getdata();
    void sale();
  private:
        vector&lt;Item&gt;items;
  };
  </code></pre>
  
  <p>after adding elements to the vector i want to find some element in the vector and print it. here is </p>
  
  <pre><code>void Inventory::sale(){                                                                                                                                                               
    int ID;
    cout&lt;&lt;"Enter ID ";
    cin&gt;&gt;ID;
    vector&lt;Item&gt;::const_iterator it;
    it=find(items.begin(), items.end(), ID);
    ++it;
  }
  </code></pre>
  
  <p>but i get an error: no matching function for call to 'find(std::vector::iterator, std::vector::iterator, int&amp;)'</p>