title: pointer conversion error c++
body: <p>I write a simple <code>list</code> class that part of is look like that: 
  When I try to build the project the compilers shows 3 errors that one of them is with pointer conversion problems and I cant get why: </p>
  
  <p>Compiler error says:</p>
  
  <blockquote>
    <ol>
    <li>'MyList::Node *MyList::begin(void)': cannot convert 'this' pointer from 'const MyList' to 'MyList &amp;'</li>
    <li>'MyList::Node *MyList::end(void)': cannot convert 'this' pointer from 'const MyList' to 'MyList &amp;'</li>
    <li>'MyList::create': no overloaded function takes 1 arguments</li>
    </ol>
  </blockquote>
  
  <p>The class(only little part..)</p>
  
  <pre><code>template&lt;class T&gt;
  class MyList
  {   
  public:
  
      typedef T* iterator;
      typedef const T* const_iterator;
      typedef T value_type;
      typedef T&amp; reference;
      typedef const T&amp; const_reference;
      struct Node
      {
          T data;
          Node* prev;
          Node* next;
      };
      typedef Node* node_iterator;
  
  
      node_iterator begin() { return first; }
      node_iterator end() { return last; }
  
      ...
  
      MyList() { create(); }//default constructor
      MyList(size_type n, const T&amp; val = T()){create(n, val);}
      MyList(const MyList&amp; l) { create(l.begin(), l.end()); }//copy constructor
      MyList&amp; operator=(const MyList&amp;);//assignment operator
      ~MyList() { uncreate(); }
  
  private:
  
      node_iterator first;
      node_iterator last;
      ...
      ...
  
  };
  
  MyList&lt;T&gt; &amp; MyList&lt;T&gt;::operator=(const MyList&amp; rhs)
  {
      if (&amp;rhs != this)
      {
          uncreate();
          create(rhs.begin(), rhs.end());
      }
      return *this;
  }
  
  template&lt;class T&gt;
  void MyList&lt;T&gt;::create(node_iterator a, node_iterator b)
  {
      ...
  }
  </code></pre>