title: How to declare length of global array with global variable?
body: <p>I want to declare length of array with global variable. But I got error, I am confused for solving this. </p>
  
  <pre><code>int BARIS = 8;
  //I get error when declare Squares Array with global variable (BARIS variable)
  int SquaresInfo[BARIS];
  
  int main(int argc, const char * argv[]) {
      cout &lt;&lt; "\n\n\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Tekan ENTER untuk masuk ke permainan";
      if(cin.get() == '\n' ) {
          system("clear");
          cout &lt;&lt; "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
          gameInterface();
      } else {
          cout &lt;&lt; " ";
      }
  
      return 0;
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/WQqu5.png" alt="enter image description here"></p>
  
  <p>I get error when declare length of SquareInfo array. I am confusing how to declare array length with global variable </p>