title: How to use std::find() with vector of custom class?
body: <p>why does the following not work?:</p>
  <pre><code>MyClass c{};
  std::vector&lt;MyClass&gt; myVector;
  std::find(myVector.begin(), myVector.end(), c);
  </code></pre>
  <p>This will give an error.</p>
  <blockquote>
  <p>error: no match for 'operator==' (operand types are 'MyClass' and 'const MyClass')</p>
  </blockquote>
  <p>However if I do the same thing with non-class datatypes instead of a &quot;MyClass&quot;, everything works fine.
  So how to do that correctly with classes?</p>