Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- / A.hpp /
- class A {
- public:
- A();
- B getB();
- }
- / A.cpp /
- #include "A.hpp"
- A::A() {}
- B A::getB() {
- B b;
- return b;
- }
- / B.hpp /
- class B {
- public:
- B();
- }
- / B.cpp /
- #include "B.hpp"
- B::B() {}
- / main.cpp /
- #include "A.hpp"
- #include "B.hpp" // bez tego nie zadziała
- int main () {
- A a;
- a.getB();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement