title: Why we have to use new operator?
body: <p>I'm trying to understand why we have to use <strong><em>new</em></strong> operator in C++. I have wrote short program:</p>
  
  <pre><code>int N;
  std::cin &gt;&gt; N;
  int tab[N];
  
  for (int i = 0; i &lt; N; i++)
   tab[i] = i + 1;
  
  for (int i = 0; i &lt; N; i++)
   std::cout &lt;&lt; "tab[" &lt;&lt; i &lt;&lt; "] = " &lt;&lt; tab[i] &lt;&lt; std::endl;
  </code></pre>
  
  <p>This program works correctly. The same behavior I have noticed in C using this algorithm (instead of malloc() function). </p>