title: reverse iterator error : no match for 'operator!=' in 'rcit != std::vector<_Tp, _Alloc>::rend() with _Tp = int, _Alloc = std::allocator'
body: <p>CODE A:</p>
  
  <pre><code>vector&lt; int &gt;::const_reverse_iterator rcit;
  vector&lt; int &gt;::const_reverse_iterator tit=v.rend();
  for(rcit = v.rbegin(); rcit != tit; ++rcit)
  cout &lt;&lt; *rcit &lt;&lt; " ";
  </code></pre>
  
  <p>CODE B:    </p>
  
  <pre><code>vector&lt; int &gt;::const_reverse_iterator rcit;
  for(rcit = v.rbegin(); rcit != v.rend(); ++rcit)
  cout &lt;&lt; *rcit &lt;&lt; " ";
  </code></pre>
  
  <p>CODE A works fine but
  why does CODE B throughs error :</p>
  
  <p>DEV C++\vector_test.cpp <strong>no match for 'operator!=' in 'rcit != std::vector&lt;_Tp, _Alloc>::rend() with _Tp = int, _Alloc = std::allocator'</strong>.</p>
  
  <p>This is  the program I was trying to write.</p>
  
  <pre><code>#include &lt;iostream&gt;
  using std::cout;
  using std::cin;
  using std::endl;
  using namespace std;
  #include &lt;vector&gt;
  using std::vector;
  template&lt; typename T &gt; void printVector( const vector&lt; T &gt; &amp;v);
  
  template&lt; typename T &gt; 
  void printVector( const vector&lt; T &gt; &amp;v)
  {
               typename vector&lt; T &gt;::const_iterator cit;
               for(cit = v.begin(); cit != v.end(); ++cit)
               cout &lt;&lt; *cit &lt;&lt; " ";
  }
  
  int main()
  {
      int number;
      vector&lt; int &gt; v;
  
      cout &lt;&lt; "Initial size of the vector : " &lt;&lt; v.size()
           &lt;&lt; " and capacity : " &lt;&lt; v.capacity() &lt;&lt; endl;
      for(int i=0; i &lt; 3; i++)
      {
              cout &lt;&lt; "Enter number : ";
              cin &gt;&gt; number;
              v.push_back(number);
      }
      cout &lt;&lt; "Now size of the vector : " &lt;&lt; v.size()
           &lt;&lt; "and capacity : " &lt;&lt; v.capacity() &lt;&lt; endl;
  
      cout &lt;&lt; "output vector using iterator notation " &lt;&lt; endl; 
      printVector(v);
  
      cout &lt;&lt; "Reverse of output ";
      vector&lt; int &gt;::const_reverse_iterator rcit;
      for(rcit = v.rbegin(); v.rend() != rcit ; ++rcit)
      cout &lt;&lt; *rcit &lt;&lt; " ";
      cin.ignore(numeric_limits&lt; streamsize &gt;::max(), '\n'); 
      cin.get();
  return 0;
  }
  </code></pre>