C++ What to put in a Class Declaration and what not
<p>I'm totally confused where to put e.g. the definition of a constructor. Sometimes you see something like this</p>

<pre><code>// point.h
class Point {
  Point(int x, int y) {
    x_ = x;
    y_ = y;
  }
private:
  const int x_;
  const int y_;
}
</code></pre>

<p>Then you sometimes see something like this:</p>

<pre><code>// point.h
class Point {
  Point(int x, int y);
private:
  const int x_;
  const int y_;
}

// point.cc
Point::Point(int x, int y) {
  x_ = x;
  y_ = y;
}
</code></pre>

<p>I.e. sometimes things like constructors, copy constructors etc. get declared in the <code>.h</code> and then implemented in the <code>.cc</code> file, sometimes they get defined in the header and so on.
But under which circumstances? Which is good practice, which is not? </p>
