Does the following indicate a bad design?
Posted
by Mewzer
on Stack Overflow
See other posts from Stack Overflow
or by Mewzer
Published on 2010-06-05T18:45:37Z
Indexed on
2010/06/05
18:52 UTC
Read the original article
Hit count: 151
Hello,
I was wondering whether you think the following code usually indicates a bad design ...
class X
{
public:
...
private:
Y y;
};
Class Y
{
public:
Y( X& value ){ x = value; };
private:
X& x;
}
(i.e. there is some sort of cyclic dependency between the classes X and Y).
© Stack Overflow or respective owner