title: How to use array of structures in while loop
body: <p>I have created a typedef structure as shown below which consists of 4 fields
  and i have inserted as array of structures which can be seen below  </p>
  
  <pre><code>typedef struct Signal {
      long vr;
      char name[20];
      char Type[20];
      char casuality[20];
  } Signal;
  </code></pre>
  
  <p>I have used array of structures as shown below</p>
  
  <pre><code>void xmlRead()
  {
      int i;
      Signal var[4];
      var[0].vr=1073741824;
      strcpy(var[0].name,"Ball1_pos");
      strcpy(var[0].Type,"Real");
      strcpy(var[0].casuality,"output");
  
      var[1].vr=1073741825;
      strcpy(var[1].name,"Ball2_pos");
      strcpy(var[1].Type,"Real");
      strcpy(var[1].casuality,"output");
  
      var[2].vr=1073741826;
      strcpy(var[2].name,"Ball1_vel");
      strcpy(var[2].Type,"Real");
      strcpy(var[2].casuality,"output");
  
      var[3].vr=1073741827;
      strcpy(var[3].name,"Ball2_vel");
      strcpy(var[3].Type,"Real");
      strcpy(var[3].casuality,"output");
  
      for(i=0; i&lt;=3; i++)
      {
          while(var[i].casuality="output") **//Here it is showing error as expression must have modifiable lvalue//**
          {
              //Some statements
          }
      }
  }   
  </code></pre>