Advertisement
Guest User

Untitled

a guest
Aug 13th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1.     / A.hpp /
  2.  
  3.         class A {
  4.         public:
  5.             A();
  6.             B getB();
  7.         }
  8.  
  9.     / A.cpp /
  10.  
  11.         #include "A.hpp"
  12.  
  13.         A::A() {}
  14.  
  15.         B A::getB() {
  16.             B b;
  17.             return b;
  18.         }
  19.  
  20.     / B.hpp /
  21.  
  22.         class B {
  23.         public:
  24.             B();
  25.         }
  26.  
  27.     / B.cpp /
  28.  
  29.         #include "B.hpp"
  30.  
  31.         B::B() {}
  32.  
  33.  
  34.  
  35.     / main.cpp /
  36.  
  37.         #include "A.hpp"
  38.         #include "B.hpp" // bez tego nie zadziała
  39.  
  40.         int main () {
  41.             A a;
  42.             a.getB();
  43.  
  44.             return 0;
  45.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement