title: C++ expected constant expression
body: <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;cmath&gt;
  #include &lt;math.h&gt;
  #include &lt;iomanip&gt;
  using std::ifstream;
  using namespace std;
  
  int main (void)
  
  {
  int count=0;
  float sum=0;
  float maximum=-1000000;
  float sumOfX;
  float sumOfY;
  int size;
  int negativeY=0;
  int positiveX=0;
  int negativeX=0;
  ifstream points; //the points to be imported from file
  //points.open( "data.dat");
  //points&gt;&gt;size;
  //cout&lt;&lt;size&lt;&lt;endl;
  
  size=100;
  float x[size][2];
  while (count&lt;size) {
  
  
  
  points&gt;&gt;(x[count][0]);
  //cout&lt;&lt;"x= "&lt;&lt;(x[count][0])&lt;&lt;"  ";//read in x value
  points&gt;&gt;(x[count][1]);
  //cout&lt;&lt;"y= "&lt;&lt;(x[count][1])&lt;&lt;endl;//read in y value
  
  
  count++;
  }
  </code></pre>
  
  <p>This program is giving me expected constant expression error on the line where I declare float x[size][2]. Why?</p>