Classes in C++ with Ctor
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list">The Definitive C++ Book Guide and List</a>  </p>
</blockquote>



<p>i have a lot of questions about declaration and implementation, according to most (books, tutorials, blog entries) a class declaration with constructor, methods and member functions:</p>

<pre><code>class Book
{
public:
    Book(const string &amp; author_,
         const string &amp; title_,
         const string &amp; publisher_,
         double price_,
         double weight_);
    string getName()
    {
        string name;
        name = author + ": " + title;
        return name.substr(0, 40);
    }
    double getPrice();
    double getWeight();
private:
    string author, title, publisher;
    double price, weight;
};
</code></pre>

<p>i understand all the the access level, the Constructor, reference operator (pointer too!), the pointer operator, but when I read things less trivial like:</p>

<pre><code>class Type
{
public:
    enum TypeT {stringT, intT, doubleT, unknownT};

    // 1. which means "explicit"?
    // 2. what's ": typeId(typeId_)"? after the Ctor declaration
    explicit Type(TypeT typeId_) : typeId(typeId_) {}

    // 3. "const" after the declaration which means?
    BaseValue * newValue() const
    {
        return prototypes[typeId]-&gt;clone();
    }

    TypeT getType() const
    {
        return typeId;
    }

    static void init();
    {
        prototypes[stringT] = new Value&lt;string&gt;("");
        prototypes[intT] = new Value&lt;int&gt;(0);
        prototypes[doubleT] = new Value&lt;double&gt;(0);
    }

private:
    TypeT typeId;

    static vector&lt;BaseValue *&gt; prototypes;
};
</code></pre>

<p>I feel lost and really have not found clear information about the above points.</p>

<p>Addition to answering my question, if you know somewhere where they have these "tricks" of language</p>
