question about class
<blockquote>
  <p><strong>Possible Duplicates:</strong><br>
  <a href="http://stackoverflow.com/questions/926752/why-should-i-prefer-to-use-member-initialization-list">Why should I prefer to use member initialization list?</a><br>
  <a href="http://stackoverflow.com/questions/2785612/c-what-does-the-colon-after-a-constructor-mean">C++ - what does the colon after a constructor mean?</a>  </p>
</blockquote>



<p>here is following code</p>

<pre><code>class vector2d {
public:
  double x,y;
  vector2d (double px,double py): x(px), y(py) {}
</code></pre>

<p>i dont understand this line</p>

<pre><code> vector2d (double px,double py): x(px), y(py) {} 
</code></pre>

<p>is it same as
 <code>vector2d(double px,double py){   x=px;y=py;}?</code>  or?</p>
