title: Why can't I assign anything to an array anymore
body: <p>I have this implementation of a linked list class (using char arrays for strange reason)</p>
  
  <pre><code>list_node::list_node(const std::string &amp; input, int start, int end) {
  std::cout &lt;&lt; "1 arg constructor called" &lt;&lt; std::endl;
  
  letters = new char[end - start + 1];
  int i = start;
  
  for (i = start; i &lt; end; i++) {
      letters[i] = input[i];
  }
  
  letters[i] = '\0';
  
  std::cout &lt;&lt; letters &lt;&lt; std::endl;
  previous = NULL;
  next = NULL;
  }
  </code></pre>
  
  <p>What I cannot fathom is that the first time, this method is called, it works. Thereafter, it doesn't. Stepping through the debugger in Eclipse, the body of the for loop does not execute at all! I added </p>
  
  <pre><code>letters[i] = '\0'
  </code></pre>
  
  <p>to make sure that my array is null-terminated, makes no difference.</p>
  
  <p>I have another method which takes in a pointer to the previous node in the linked list. I just omitted it</p>