title: How to get overflow exception in C++?
body: <p>What's the easiest way to catch an overflow exception in C++?</p>
  
  <p>For example, when I'm writing something like</p>
  
  <pre><code>int a = 10000, b = 100000;
  int c = a * b;
  </code></pre>
  
  <p>or (optionally)</p>
  
  <pre><code>std::cout &lt;&lt; a * b;
  </code></pre>
  
  <p>I'd like to catch an exception (or notification). How to do so? Maybe there is any native solution for GNU C++, isn't there?</p>