title: Getting the C++ compilers in Code::Blocks and Visual Studio to adhere to C++(11) standard?
body: <p>I use two C++ compilers / IDEs. (1) g++ in Code::Blocks and (2) Visual C++ in Visual Studio.</p>
  
  <p>I have some question on how to set up the compiler in the way I want it to be.</p>
  
  <p>Code::Blocks: I want to make G++ follow standard C++. For example:</p>
  
  <pre><code>int x; 
  cin &gt;&gt; x; 
  int arr[x];
  </code></pre>
  
  <p>...wouldn't work in standard C++.</p>
  
  <p>In standard C++, one has to use dynamic allocation. For example, the Visual C++ compiler would reject this code. However, this code would work in Code::Blocks.</p>
  
  <p>How do I make g++ reject this code?</p>
  
  <p>Also, how do I tell g++ and Visual C++ 2013 to follow and only follow C++11 standard? It seems to me the default one is still C++98/03.</p>