Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <QSlider>
- class QSlider;
- // a.h
- #include "b.h"
- struct A { B * a; }
- // b.h
- #include "a." // circlular include reference
- struct B { A * a; }
- // Solution: break circular reference by forward delcaration of B or A
- // foo.h
- #include <qslider>
- class Foo
- {
- QSlider * someSlider;
- }
- // bar.h
- #include "foo.h"
- class Bar
- {
- Foo * kungFoo;
- // ...
- }
- // bar.h
- class Foo;
- class Bar
- {
- Foo * kungFoo;
- // ...
- }
- // bar.cpp
- #include "bar.h"
- #include "foo.h"
- // ...
- /* --- --- --- Y.hpp */
- class X;
- class Y {
- X *x;
- };
- /* --- --- --- Y.cpp */
- #include <x.hpp>
- #include <y.hpp>
- ...
Add Comment
Please, Sign In to add comment