title: How to assign values in a dynamic structure parameters
body: <p>I have the following structure:</p>
  
  <pre><code>typedef struct {
    char nom[30], prenom[20];
    int age;
  } ITEM;
  
  //and I have a function where I am entering the info as follow:
  
  void Lire(ITEM **items, int *nb_items)
  {
      int i,j = 0, novalida = 0;
      ITEM *temp;
      printf("*** Entrer les donnees et taper . pour terminer\n\n");
  
      for (i = 0; TRUE; i++) {
  
          temp = (ITEM *) realloc(*items, ((*nb_items + 1) * sizeof(ITEM)));
          if (temp == NULL)
          {
              printf("Il n'y a pas de memoire! \n");
              exit (0);
          }
          *items = temp;
          printf("&gt; nom    : ");
          scanf("%s", **items[i].nom);
  </code></pre>
  
  <p>and I got the the error:</p>
  
  <pre><code> request for member ‘nom’ in something not a structure or union
   scanf("%s", **items[i].nom);
  </code></pre>
  
  <p>Then I want to know if I should assign the values to dynamic structures the same way I go with normal structures.</p>