title: C - incompatible pointer to integer conversion?
body: <p>when I try to run the following code I get this warning:   </p>
  
  <pre><code>warning: incompatible pointer to integer conversion assigning to
    'char' from 'char *'; dereference with * [-Wint-conversion]
      namesList[0]=name1;
  </code></pre>
  
  <p>Here is my code:  </p>
  
  <pre><code>int main(){
      char namesList[20];
      char *name1="Nelson Mandela";
      namesList[0]=name1;
      return 0;
  }  
  </code></pre>
  
  <p>How do I get rid of this warning? Thank you.<br>
  Edit: Jonathan Leffler helped me fix it by doing <code>namesList[0] = *name1;</code></p>