title: Visual C array of structs - expression must have a constant value
body: <p>I'm trying to create an array of structs but keep getting this error. 
  can you please advise?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  #define MODEL_LENGTH 4
  #define NUM_OF_DESTINATIONS 8
  #define MAX_DESTINATIONS_WORD_LENGTH 12
  #define NUM_OF_PLANES 3
  typedef struct
  {
      char p_model[MODEL_LENGTH];
      char p_destinations[NUM_OF_DESTINATIONS][MAX_DESTINATIONS_WORD_LENGTH];
  } airplane;
  
   airplane  a_737 = { "737", {"Larnaca", "Athens", "Budapest", "Zurich", 
  "London", "Paris", "Rome"} };
   airplane  b_747 = { "747", {"London", "New York", "Bangkok"} };
   airplane  c_787 = { "787", {"London", "New York", "Los Angeles", "Hong 
  Kong", "Miami"} };
  
  airplane planes_arr[NUM_OF_PLANES] = { a_737, b_747, c_787 };
  </code></pre>
  
  <p>I used to have numbers instead of #define, after reading posts I changed it but I still don't understand what's wrong here.</p>
  
  <p>update:
  I tried changing the array to an "airplane *planes_arr[]". 
  I tried typing:
      <code>airplane *a_ptr = &amp;a_737;</code>
  and tried to put "a_ptr" in the array and I keep getting the same error.</p>
  
  <p>now, i changed to this:
      <code>airplane *planes_arr[NUM_OF_PLANES] = { &amp;a_737, &amp;b_747, &amp;c_787};</code>
  and no error showed.</p>
  
  <p>can I please get an explanation on the topic?</p>