assign passed object to member object in constructor
<p>for some reason I can´t achieve this.</p>

<pre><code>Line::Line(const Pixel &amp;aStart, const Pixel &amp;aEnd){
  start = aStart;
  end = aEnd;
}
</code></pre>

<p>the Line class:</p>

<pre><code>class Line : public Vertex{
public:
  Line(const Pixel &amp;start, const Pixel &amp;end);
  Pixel getStart();
  Pixel getEnd();
private:
  Pixel start;
  Pixel end;
};
</code></pre>

<p>g++ tells me</p>

<blockquote>
  <p>error: no matching function for call to ‘Pixel::Pixel()’
  note: candidates are: </p>

<pre><code>- Pixel::Pixel(int, int, int, int, int)
- Pixel::Pixel(int, int)
- Pixel::Pixel(const Pixel&amp;)//not implemented by me, some sort of default constructor?
</code></pre>
</blockquote>

<p>I thought actually Im using the last constructor, but something doesnt work. Any help much appreciated.</p>

<p>EDIT: The Pixel Class:</p>

<pre><code>class Pixel{
public:
  Pixel(int x, int y);
  Pixel(int red, int green, int blue, int x, int y);
  void setRed(int red);
  void setGreen(int green);
  void setBlue(int blue);
  void setColor(int r, int g, int b);
  int getRed();
  int getGreen();
  int getBlue();
  bool isChanged();
  int getX();
  int getY();
private:
  int red;
  int green;
  int blue;
  int x;
  int y;
  bool hasBeenChanged;
};
</code></pre>
