How to properly cast an object?
<p>I have a code,</p>

<pre><code>class foo : public bar
{
 public:
    foo(){};
    ~foo(){};
};

class wu
{
 public:
    wu(const bar&amp; Bar ) :
       m_bar(Bar)
    {};
    ~wu(){};

 private:
    bar m_bar;

};

int main()
{
    foo tmpFoo;
    wu tmpWu(tmpFoo);
}
</code></pre>

<p>Now my problem is, the code above will not compile and the error message is "error: variable wu tmpWu has initializer but incomplete type".</p>

<p>Does it mean, I have to cast the tmpFoo object to bar class?</p>

<p>Please advice.</p>

<p>Thanks.</p>
