title: What do default values of pointers in constructors mean?
body: <p>I try to understand this code (it is taken from <a href="http://ootips.org/yonat/4dev/smart-pointers.html" rel="noreferrer">here</a>):</p>
  
  <pre><code>template &lt;class T&gt; class auto_ptr
  {
      T* ptr;
  public:
      explicit auto_ptr(T* p = 0) : ptr(p) {}
      ~auto_ptr()                 {delete ptr;}
      T&amp; operator*()              {return *ptr;}
      T* operator-&gt;()             {return ptr;}
      // ...
  };
  </code></pre>
  
  <p>I have problem with understanding this line of the code: <code>explicit auto_ptr(T* p = 0) : ptr(p) {}</code>.</p>
  
  <p>As far as I understand, with this line we try to define a constructor that has one argument of <code>pointer-to-object-of-T-class</code> type. Then we have <code>= 0</code>. What is that? Is it a default value? But how <code>0</code> can be a default value of a pointer (pointer should have addresses as a values, not integer).</p>