title: What does “request for member '*******' in something not a structure or union” mean?
body: <p>Is there an easy explanation for what this error means?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  
  struct student {
          char Surname[30];
          char Name[30];
          int Age;
          char Address[10];
  
  };
  
  int main(){
       int i;
       char temp1;
       char temp2;
       int temp3;;
       char temp4;
       struct student x[2];
       for(i=1; i&lt;3; i++){
                struct student x[i];
               printf(" Surname of Student %s:", i);
               scanf("%s",&amp;temp1);
               printf(" Other names of Student %s:", i);
               scanf("%s",&amp;temp2);
               printf(" Age of Student %s:", i);
               scanf("%s",&amp;temp2);
               printf(" Address of Student %s:", i);
               scanf("%s",&amp;temp3);
               strcpy(x-&gt;Surname,&amp;temp1);
               strcpy(x-&gt;Name,&amp;temp2);
               //x[i].Surname=temp1;
               //x[i].Name=temp2;
               x[i].Age=temp3;
               //x[i].Address=temp4;
               strcpy(x-&gt;Address,&amp;temp4);
  
               }
       int temp;
       if (x[1].Age &gt; x[2].Age){
                       temp = 1;
                       printf(x.Surname[temp]);
                       printf(x.Name[temp]);
                       printf(x.Age[temp]);
                       printf(x.Address[temp]);
                    }
       else if(x[1].Age &lt; x[2].Age){
                       temp = 2;
                       printf(x.Surname[temp]);
                       printf(x.Name[temp]);
                       printf(x.Age[temp]);
                       printf(x.Address[temp]);
                    }
       else{
                       printf(x.Surname[1]);
                       printf(x.Name[1]);
                       printf(x.Age[1]);
                       printf(x.Address[1]);
  
                       printf(x.Surname[2]);
                       printf(x.Name[2]);
                       printf(x.Age[2]);
                       printf(x.Address[2]);
  
                        }
  
       return 0;
  
  
  
  
  
  
  
  
  
  };
  </code></pre>
  
  <p>im getting the error request for member `Surname' in something not a structure or union... Its actually for all the print lines... Can someone please help me with this? im new to C programming.... </p>