title: A c++ syntax question: class for method
body: <p>in the code below, it has the following line  </p>
  
  <pre><code> base_list(const base_list &amp;tmp) :memory::SqlAlloc()
  </code></pre>
  
  <p>base_list is a method, memory is a namespace, SqlAlloc is a class, so what does it mean when combine them together? </p>
  
  <pre><code>class base_list :public memory::SqlAlloc
  {
  public:
    base_list(const base_list &amp;tmp) :memory::SqlAlloc()
    {
      elements= tmp.elements;
      first= tmp.first;
      last= elements ? tmp.last : &amp;first;
    }
  </code></pre>