title: Expression must be modifiable lvalue
body: <p>I'm trying to store a structure of capacity 6 in another structure.</p>
  
  <pre><code>struct eachElement {
      float centerX;
      float centerY;
      int flagMountain;
  };
  
  
  eachElement cn[6];
  
  
  struct characters {
       eachElement each[6];
  };
  
  
  characters chars[1500];
  
  
  float strtPt = 235.0;
  float initializer = strtPt;
  float endPt = 120.0;
  float holder = endPt;
  int count = 0;
  int ctr = 0;
  int cr = 0;
  int countCharacters = 0;
  int dup = 0;
  
  
  while (holder &lt; m_img_height) {
  
      for (float i = initializer ; i &lt; m_img_width - 500; ) {  
  
          float j = holder;  
  
          int ck = 1;
  
          while (ck &lt; 4) {
  
              cvCircle(image, cvPoint(i, j), 3, cvScalar(0, 255, 0), 1);
              cr = ctr++;
              cn[cr].centerX = i;
              cn[cr].centerY = j;
              cn[cr].flagMountain = 1;
  
  
  
  
              cvCircle(image, cvPoint(i + 5, j + 5), 1, cvScalar(0, 255, 0), 1);
  
  
              j += 9.448;
  
              count++;
  
  
              ck++;
  
  
          }
  
  
  
  
          if (count == 6) {
              i += 23.811;
  
              count = 0;
              ctr = 0;
  
              dup = countCharacters++;
  
               chars[dup].each = cn;
  
          }
          else
              i += 9.448;
  }
  
      holder += 56.686;
  
  }
  </code></pre>
  
  <p>In this line,</p>
  
  <p>chars[dup].each = cn;</p>
  
  <p>it gives me an error saying expression must be a modifiable lvalue.</p>
  
  <p>Even though I'm assigning it to the same type, I got this error. </p>
  
  <p>Any help would be appreciated.</p>