title: find() stl in vector in c++
body: <p>Today I was trying to find a position of a element in a vector without binary search code and I found out that there is something as find() stl 
  And I implemented it and it is compiling but it is not giving correct output </p>
  
  <p>Here is my code : </p>
  
  <pre><code>#include &lt;bits/stdc++.h&gt;
  using namespace std;
  
  int main() {
  
      int n;
      vector&lt;int&gt; a(0);
  
      a.push_back(6);
      a.push_back(3);
      a.push_back(9);
      a.push_back(5);
      a.push_back(1);
  
      vector&lt;int&gt; :: iterator b;
      b = find(a.begin() , a.end() , 3);
  
      cout &lt;&lt; (a.end() - b); // output is 4
  
      return 0;
  }
  </code></pre>
  
  <p>What should I do to get the position of any element in a vector ? 
  Thanks </p>