title: How to "remove" an element from an array of strings
body: <p><em>Read a lot of different answers but couldn´t find a way to fix this, so here I am with yet a "how-to" question.</em>   </p>
  
  <p>So I´m trying to "remove" an element from an array I´ve created. As I´ve understood it, there is no way to simply remove an element, rather you would need to move proceeding elements to the left of the array, thus overwriting the element you dont want with already existing elements.</p>
  
  <p>Tried to do exactly that in my removeToDoItem-function, but the error I am getting is: <strong>assigment to expression with array type.</strong> Been following this tutorial <a href="https://codeforwin.org/2015/07/c-program-to-delete-element-from-array.html" rel="nofollow noreferrer">https://codeforwin.org/2015/07/c-program-to-delete-element-from-array.html</a>, but it seems like I am missing something.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #define Listsize 10
  #define Stringsize 30
  #include &lt;string.h&gt;
  
   void printToDolist(char toDolist[][Stringsize], int placering)
  {
      for(int i= 0; i&lt;placering; i++)
          printf("%d - %s\n", i+1, toDolist[i]);
  }
  
  int addToDoItem(char toDolist[][Stringsize], int placering)
  {
      int i;
      for( i=1; i&lt;=3; i++)
      {
      printf(" Add a note: ");
      fgets(toDolist[i], 30 , stdin);
      }
  
      return placering+i;
  }
  
  int removeToDoItem(char toDolist[][Stringsize], int placering)
  {
  
      int position,i;
  
  
      printf(" Which element would you like to remove?: ");
      scanf("%d", &amp;position);
  
      for(i=position-1; i&lt; placering-1; i++)
      {
          toDolist[i] = toDolist[i+1];
  
      }
          return placering--;
  }
  </code></pre>
  
  <p>int main()</p>
  
  <pre><code>{
  char toDolist[Listsize][Stringsize] = {[0]= "Buy candy \n"};
  
  int placering = 0;
  placering = addToDoItem(toDolist, placering);
  printToDolist(toDolist, placering);
  removeToDoItem(toDolist, placering);
  
  return 0;
  }
  </code></pre>