title: Error in program saying "This file requires compiler and library support for the ISO C++ 2011 standard"
body: <p>This program allows the user to enter expenses for each season and then displays the values and then the total cost at the bottom. It's giving me this error, however, </p>
  
  <pre><code>In file included from /usr/include/c++/4.8.3/array:35:0,
                   from main.cpp:2:
  /usr/include/c++/4.8.3/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
   #error This file requires compiler and library support for the \
  </code></pre>
  
  <p>How do I fix this?</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;array&gt;
  #include &lt;string&gt;
  
  // constant data
  const int Seasons = 4;
  const std::array&lt;std::string, Seasons&gt; Snames =
      {"Spring", "Summer", "Fall", "Winter"};
  
  // function to modify array object
  void fill(std::array&lt;double, Seasons&gt; * pa);
  // function that uses array object without modifying it
  void show(std::array&lt;double, Seasons&gt; da);
  
  int main()
  {
      std::array&lt;double, Seasons&gt; expenses;
      fill(&amp;expenses);
      show(expenses);
      return 0;
  }
  
  void fill(std::array&lt;double, Seasons&gt; * pa)
  {
      using namespace std;
      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(std::array&lt;double, Seasons&gt; da)
  {
      using namespace std;
      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>