title: Overloading the ++ operator to increment an iterator
body: <p>I am currently creating a square list and one of the requirements is to overload the the pre- and postfix ++ operator.</p>
  
  <p>I've tried to overload the ++operator in my .hpp file to increment an iterator. But when calling the ++operator it does not call the overloaded code and just uses the default. </p>
  
  <pre><code>iterator&amp; operator ++ () {  // pre-increment 
          std::list&lt;int&gt;::iterator i = list_Values.begin(); 
          advance(i,1); 
          return &amp;*i; 
      } 
  
      iterator operator ++ (int) { // post-increment 
          std::list&lt;int&gt;::iterator i = list_Values.begin(); 
          advance(i,1); 
          return &amp;*i; 
      } 
  </code></pre>
  
  <p>I try to invoke the ++operator this way:</p>
  
  <pre><code>int* test = sqrList.begin();
    ++test;
  
    test++;
  </code></pre>