title: Create static array from excel/CSV values
body: <p>I have a large array in Excel containing different data types. See snippet below:</p>
  
  <pre><code>Param,String1,String2,Bits,Disp fmt,Extra,use act
  0,Coarse,Tune,4,2,,0
  1,Wave,form,4,7,128,0
  2,Filter,Type,4,8,,0
  3,F Env,A,4,5,3,0
  4,F Env,D/R,4,5,3,0
  5,F Env,S,4,5,3,0
  6,A Env,A,4,6,6,0
  7,A Env,D,4,6,6,0
  8,A Env,S,4,6,6,0
  9,A Env,R,4,6,6,0
  10,LFO,Wave,4,7,64,0
  </code></pre>
  
  <p>....... etc</p>
  
  <p>There's 2 strings and some integers.  I need to work out a way to get this into C++ as efficiently as possible. It is for an embedded system, so needs to be totally self-contained within the C++ code (can't open other apps, read files etc).</p>
  
  <p>My initial thought is to create a class containing the datatypes in the columns.<br>
  Then declare a static array of the class. But how do I then populate the array at run-time with the data?</p>
  
  <p>It's essential that the array is declared as static const, so that it goes into program memory, not SRAM.</p>
  
  <p>With regard to the string elements, only some of the rows in the data will have strings, so keen not to initialize a fixed size array for them, when only some will be filled.</p>
  
  <p>Obviously this data doesn't have to initially exist in Excel, if there's better ways of generating large static arrays in C++, I'd be happy to try.</p>