title: Creating a c-array of CGPoints
body: <p>I'd like to create a constant array of CGPoints in a c style array.</p>
  
  <p>I started with this but got the error <code>Initializer element is not a compile time constant</code></p>
  
  <pre><code>static CGPoint locations[5] = 
  {
      CGPointMake(180, 180),
      CGPointMake(300, 130),
      CGPointMake(435, 120),
      CGPointMake(470, 230),
      CGPointMake(565, 200),
  };
  </code></pre>
  
  <p>I removed the <code>static</code> thinking it might be something to do with that, but the error remained.</p>
  
  <p>How can you create an array of CGPoints (and more widely, any similarly defined struct).</p>
  
  <hr>
  
  <p><sub>
  NB: I've posted this question and answer partially for my own reference as I can never remember this off the top of my head and waste too much time researching the answer from other sources. Here's hoping it helps others!
  </sub></p>