title: How to initialize arrays and vectors in old extension clang and gcc compilers in macOS?
body: <p>I have a code in c++. It works in windows, Ubuntu and Fedora.
  Now I want to compile it for macOS. I encountered some errors like</p>
  
  <pre><code>error: expected expression
  error: variable-sized object may not be initialized
  </code></pre>
  
  <p>I have many lines like</p>
  
  <pre><code>int A[n][2] = {{2, 5},{2, 6},{3, 4},{3, 7},{4, 3},{5, 2},{6, 2},{7, 3}};
  int B[n][2] = {{8, 15},{8, 16},{9, 14},{9, 17},{10, 13},{10, 14},{10, 17},{11, 12},{11, 15},{11, 16},{12, 11},{13, 10},{14, 9},{14, 10},{15, 8},{15, 11},{16, 8},{16, 11},{17, 9},{17, 10}};
  </code></pre>
  
  <p>I searched it is because of the old installed clang and gcc extension in macOS (I am using Mojave 10.14.0)</p>
  
  <p>I do not know what can I do to resolve this problem.</p>