title: Declaring array of int in C++ under Xcode
body: <p>What is the difference between these two declarations?</p>
  
  <pre><code>int myints[5];
  
  array&lt;int,5&gt; myints;
  </code></pre>
  
  <p>If I use the first declarations and the function size(), there will be a error "Member reference base type 'int [5]' is not a structure or union".
  But if I use the second declarations and the function size(), the program works.
  Why would the first declarations does not work?</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  #include &lt;array&gt;
  
  using namespace std;
  
  int main()
  {
  //int myints[5];      //illegal
  
  array&lt;int,5&gt; myints;  //legal
  
  cout &lt;&lt; "size of myints: " &lt;&lt; myints.size() &lt;&lt; endl;    //Error if I use the first declarations
  cout &lt;&lt; "sizeof(myints): " &lt;&lt; sizeof(myints) &lt;&lt; endl;
  }
  </code></pre>