title: How to catch the null pointer exception?
body: <pre><code>  try {
          int* p = 0;
          *p = 1;
      } catch (...) {
          cout &lt;&lt; "null pointer." &lt;&lt; endl;
      }
  </code></pre>
  
  <p>I tried to catch the exception like this but it doesn't work,any help?</p>