C++ - what does the colon after a constructor mean?
<blockquote>
  <p><strong>Possible Duplicates:</strong><br>
  <a href="http://stackoverflow.com/questions/2349978/variables-after-the-colon-in-a-constructor">Variables After the Colon in a Constructor</a><br>
  <a href="http://stackoverflow.com/questions/2445330/importance-of-a-singlecolon-in-c">Importance of a singlecolon &ldquo;:&rdquo; in C++</a><br>
  <a href="http://stackoverflow.com/questions/1272680/c-constructor-syntax-question-noob">C++ constructor syntax question (noob)</a>  </p>
</blockquote>



<p>I'd happily Google this but don't know what to call it to Google it.</p>

<p>I have a piece of code here:</p>

<pre><code>class demo 
{
private:
    unsigned char len, *dat;

public:
    demo(unsigned char le = 5, unsigned char default) : len(le) 
    { 
        dat = new char[len];                                      
        for (int i = 0; i &lt;= le; i++)                             
            dat[i] = default;
    }

    void ~demo(void) 
    {                                            
        delete [] *dat;                                           
    }
};

class newdemo : public demo 
{
private:
    int *dat1;

public:
    newdemo(void) : demo(0, 0)
    {
     *dat1 = 0;                                                   
     return 0;                                                    
    }
};
</code></pre>

<p>(It's from a past exam paper and the question is to correct errors in the code so ignore errors!)</p>

<p>My question is, what are the ": len(le) " and " : demo(0, 0)" called? Something to do with inheritance?</p>
