Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <list>
  2.  
  3. class A
  4. {
  5.     static std::list<int> field;
  6. };
  7.  
  8. class B
  9. {
  10.     B()
  11.     {
  12.         A::field.push_front(42);
  13.     }
  14.  
  15.     static B instance;
  16. };
  17.  
  18. static B B::instance();
  19. static std::list<int> A::field();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement