C++ Why isn't the second expression valid?
<p>Suppose you have the following object hierarchy:</p>

<pre><code>class Vehicle {
public:
  virtual ~Vehicle() {}
};
class LandCraft: public Vehicle {};
class Truck: public LandCraft {};
</code></pre>

<p>Now, we have the two expressions:</p>

<pre><code>Truck truck;
Vehicle&amp; vehicle = truck;
</code></pre>

<p>According to a solution to a homework, the second expression is not valid. But why? My compiler doesn't complain at all, and I don't see what should be wrong here.</p>
