title: C++ assigning to an array from an initializer list
body: <p>I have been working on a program to display a menu to the screen.
  It was working but</p>
  
  <pre><code>void parser() {
      parsed[0]=data[position];
      for (i=1; i&lt;=Choices; i++) {
          for (ii = 0; ii&lt;= Depth-cDepth; ii++) {
              incriment += pow(Choices, ii);
          }
          incriment++;
          buff = position + incriment;
          parsed[i] = data[buff];
      }
      cout &lt;&lt; parsed;
  }
  </code></pre>
  
  <p>is returning the error: </p>
  
  <pre><code>- invalid types ‘std::string [3] {aka std::basic_string&lt;char&gt; [3]}[double]’ for array subscript
  </code></pre>
  
  <p>Any help would be appreciated, and I know there are similar questions but I couldn't understand the answers.</p>
  
  <ul>
  <li>EDIT: The error is on the line parsed[i]=data[buff]</li>
  <li>EDIT 2: I added icopy = i, where  icopy is an int and it compiles, although now durring runtime I get "Segmentation fault (core dumped)".</li>
  </ul>