title: User defined size of array
body: <p>I want to initialize an array with user defined size, but what know is- I've to declare an array of  maximum size and then work on number of elements given by user in this process huge memory wastes. Is there any way to declare an array of size given by user.
  I did this but compiler showed error.</p>
  
  <pre><code>int a=0;
  std::cout&lt;&lt;"Enter size of array";
  std::cin&gt;&gt;a;
  const int b=a;
  int ary[b];
  </code></pre>
  
  <p>I'm using Turbo C++IDE</p>