title: Inserting a node at the end of the list with the data of the first node
body: <p>I am supposed to create a function to show the data in the first node and then making that node the last node in the list.  But I think an easier approach, would be to make the node after the first node the head of the list, and inserting a new node in the end of the list that has the data of the previous first node, I tried using different approaches but I am getting random question marks and symbols when doing so, I tried different methods but I can't really figure out what the problem is.</p>
  
  <p>The code is attached below</p>
  
  <pre><code>  int places::showfirst()
    {
          node * current = head;
          node * temp = current -&gt; next;
          node * temp2 = new node;
          cout &lt;&lt; "The first place you visited is \n\n\t\n " &lt;&lt; current -&gt; place &lt;&lt; endl;
          current-&gt;place = temporary;
          first = new char [strlen(temporary) +1];
          strcpy(first,temporary);
  
          while(current-&gt;next)
          {
                current = current -&gt; next;
          }
          head = temp;
          current -&gt; next = temp2;
          temp2 -&gt; next = NULL;
          temp2-&gt;place = first;
  
          cout&lt;&lt;"THIS IS THE NEW LAST NODE " &lt;&lt; temp2-&gt;place &lt;&lt; endl;
          return 1;
    } 
  </code></pre>
  
  <p>Any suggestions would be appreciated, Thank you in advance.</p>