title: how to catch out of memory exception in c++?
body: <p>can anyone please tell me how to catch out of memory exception?</p>
  
  <p>for ex.</p>
  
  <pre><code>try
  {
      while(true)
      {
          int i = new int;
      }
  }
  catch( ? &lt;--- what should be put here?)
  {
      //exception handling
  }
  </code></pre>
  
  <p>and also this,</p>
  
  <pre><code>queue&lt;int&gt; q;
  try
  {
       while(true)
       {
            q.push(10);
       }
  }
  catch( ? &lt;---- what should be put here?)
  {
       //error handling
  }
  </code></pre>