title: How to convert pointer array to char array?
body: <p>I have this:</p>
  
  <pre><code>typedef struct nodebase{
    char name[254];
    char sex;
    int  clientnum;
    int  cellphone;
    struct nodebase *next;
    struct nodebase *encoding;
  } clientdata;
  </code></pre>
  
  <p>I have added <code>clientdata *curr[];</code> in seperate function. The reason why I made <code>*curr</code> into <code>*curr[]</code> instead is that this client data will be stored in a <code>.txt</code> file. So I came up with singly linked-list to read all the data and when the program <code>fscanf</code> every 5th variable, I will add 1 to <code>clientcounter</code>. </p>
  
  <p>So, the <code>*curr[]</code> will be <code>*curr[clientcounter]</code>. </p>
  
  <p>Now, I need to convert this pointer array into char array named <code>temp[clientcounter]</code> because char array is needed to evaluate something else later in the code. </p>
  
  <p>I came up with this code below:(Using Tiny C on Windows)</p>
  
  <pre><code>void loaded_data_transfer(clientdata *curr,clientdata temp[],int clientcounter)
  {
  clientdata temp[] = {0};
  
  temp[clientcounter].name = curr[clientcounter]-&gt;name;
  temp[clientcounter].sex = curr[clientcounter]-&gt;sex;
  temp[clientcounter].clientnum = curr[clientcounter]-&gt;clientnum;
  temp[clientcounter].cellphone = curr[clientcounter]-&gt;cellphone;
  
  }
  </code></pre>
  
  <p>The problem is, Tiny C is giving me an error: <code>lvalue expected</code> at <code>temp[clientcounter.name = ...</code> part. Can anyone tell me what did I do wrong?</p>
  
  <p>And if anyone knows a better way to keep track of the <code>curr</code> of clientdata by using counter and by using singly linked-list, please let me know.</p>