title: c++ initialize array with declared size as a value of an integer
body: <p>I want to initialize an array with a size using a value I read into an integer variable.
  I cant seem to understand why it works in Dev-C++ but not in Turbo C++. Here's the code to help make things clear</p>
  
  <pre><code>int arr_size; //cin max value for lets say number of students or something...
  cin &gt;&gt; arr_size;
  int array[arr_size]; // declares array with size (assume 10 or 100) with range 0 to 9 or 0-99
  </code></pre>
  
  <p>The compiler shows an error in Turbo C++ (really old, I know, but my school uses it unfortunately). Dev-C++ and codeblocks doesnt.</p>
  
  <p>Why is that so? I know its bad practice "as they define it in some books" to have an array size the same as an int value, but is there a work around for this in Turbo C++?
  I want to know why the error happens and how I can get a work around it ... thanks a lot!</p>