title: Code Blocks C++ Error expected primary expression before enum
body: <p>I am self teaching myself in C++ so I just would like to ask for your forgiveness if my question is really basic.</p>
  
  <p>I am following a tutorial on <a href="http://www.learncpp.com/cpp-tutorial/61-arrays-part-i/" rel="nofollow">www.learncpp.com</a></p>
  
  <p>According to the tutorial, I could define my c++ array such as like this</p>
  
  <pre><code>int main()
  {
      using namespace std;
      enum ArrayElements
      {
          MAX_ARRAY_SIZE = 5;
      };
  
      int anArray[MAX_ARRAY_SIZE];
      return 0;
  }
  </code></pre>
  
  <p>But codeblock keep on issuing error</p>
  
  <pre><code>||=== Build: Debug in CH6 (compiler: GNU GCC Compiler) ===|
  In function 'int main()':|
  |6|error: expected primary-expression before 'enum'|
  error: expected ';' before 'enum'|
  ||=== Build failed: 2 error(s), 1 warning(s) (0 minute(s), 0 second(s)) ===|
  </code></pre>
  
  <p>I just dont know what is causing the error or is there a problem with the tutorial I am following?</p>