title: How can I insert value in a char array?
body: <p>I'm trying to create a linked list and save the value "Peter" in the first list element. I'm having a problem with the char array. I can't insert "Peter" in it.        </p>
  
  <pre><code>    #include &lt;iostream&gt;
      #include &lt;string&gt;
      #include &lt;stdlib.h&gt;
  
      using namespace std;
  
      struct ListElement{
      char name[20];
      ListElement* next;
  
      };
  
     int main ()
     {
  
     ListElement* first;
     first = new ListElement;
     first -&gt; name= "Peter"; // Array type 'char [20]' is not assignable
  
  
     };
  </code></pre>