title: Return element of linked list
body: <p>Please delete. </p>
  
  <p>I want to implement a linked list. Unfortunately I'm not sure whether I'm on the right track.</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  class Node {
      friend class List;
  public:
      int value;
  private:
      Node *next;
  };
  
  class List {
  public:
      List ();
      ~List ();
      Node * first() const;
      Node * next(const Node * n) const;
      void append (int i);
  
      Node* head;
  };
  
  List::List() {
      Node* head = new Node();
  }
  
  List::~List() {
      while(head != NULL) {
          Node * n = head-&gt;next;
          delete head;
          head = n;
      }
  }
  
  Node * List::first() const {
      return head; // this could also be wrong
  }
  
  Node * List::next(const Node * n) const {
      return n + 1; // ERROR
  }
  
  void List::append(int i) {
      Node * n = new Node;
      n-&gt;value = i;
      n-&gt;next = head;
      head = n;
  }
  
  int main(void) {
      List list;
      list.append(10);
  
      return 0;
  }
  </code></pre>
  
  <p>When I try to return an element in <code>next()</code> I get this error:  </p>
  
  <pre><code>In member function ‘Node* List::next(const Node*) const’:|
  error: invalid conversion from ‘const Node*’ to ‘Node*’ [-fpermissive]|
  </code></pre>
  
  <p>Could somebody please help me?</p>
  
  <p><strong>EDIT:</strong><br>
  I've updated the error-line.</p>