title: array was not declared in this scope
body: <p>I am written a c++ program and in it used <code>array</code> object and included <code>&lt;array&gt;</code> header file but when I try to compile it using <code>g++</code> it return a lot of error messages saying that "array was not declared in this scope". What can be wrong with it.
  Program is here:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;array&gt;
  
  using namespace std;
  
  const int Seasons = 4;
  const array&lt;string, Seasons&gt; Snames =
   {"spring", "summer", "fall", "winter"};
  
  void fill(array&lt;double, Seasons&gt;* pa);
  void show(array&lt;double, Seasons&gt; da);
  
  int main()
  {
  array&lt;double, Seasons&gt; expenses;
  fill(&amp;expenses);
  show(expenses);
  
  return 0;
  }
  
  void fill(array&lt;double, Seasons&gt;* pa)
  {
   for(int i = 0; i &lt; Seasons; i++)
   {
      cout &lt;&lt; "Enter " &lt;&lt; Snames[i] &lt;&lt; " expenses: ";
      cin &gt;&gt; *pa[i];
   }
  }
  
  void show(array&lt;double, Seasons&gt; da)
  {
  double total = 0.0;
  cout &lt;&lt; "\nEXPENSES\n";
  
   for(int i = 0; i &lt; Seasons; i++)
   {
      cout &lt;&lt; Snames[i] &lt;&lt; ": $" &lt;&lt; da[i] &lt;&lt; endl;
      total += da[i];
   }
  cout &lt;&lt; "Total Expenses: $" &lt;&lt; total &lt;&lt; endl;
  }
  </code></pre>