Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. class A
  2. {
  3.  
  4. public:
  5.  
  6. void GetValue(void);
  7.  
  8. private:
  9.  
  10. sf::Sprite Sprite;
  11.  
  12. };
  13.  
  14. //A Code
  15. void A::GetValue(void)
  16. {
  17. return Sprite.GetPosition();
  18. }
  19.  
  20. class B
  21. {
  22.  
  23. public:
  24.  
  25. //...
  26.  
  27. private:
  28.  
  29. A a;
  30. sf::Sprite Sprite2;
  31.  
  32. };
  33.  
  34. //B Code
  35. Sprite2.SetPosition(a.GetValue());
  36. //Gibt immer 0 aus obwohl die Position von Sprite wo anders ist...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement