A
Andrea Crotti
Now, suppose that in
--8<---------------cut here---------------start------------->8---
class X
private:
ostream& out;
Other obj;
--8<---------------cut here---------------end--------------->8---
But object has a constructor that takes "out" as a parameter, which in
this step is of course not initialized.
How can I solve it? With a pointer maybe (also a reference would have
the same problem)?
Or maybe this should not happen in general?
--8<---------------cut here---------------start------------->8---
class X
private:
ostream& out;
Other obj;
--8<---------------cut here---------------end--------------->8---
But object has a constructor that takes "out" as a parameter, which in
this step is of course not initialized.
How can I solve it? With a pointer maybe (also a reference would have
the same problem)?
Or maybe this should not happen in general?