Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #ifndef KOCKA_HPP_INCLUDED
  2. #define KOCKA_HPP_INCLUDED
  3.  
  4. #include<cstdlib>
  5.  
  6. class Kocka
  7. {
  8. private:
  9. int vrednost;
  10.  
  11.  
  12. public:
  13.  
  14. Kocka()
  15. {
  16. vrednost=1;
  17. }
  18.  
  19. Kocka(int vr)
  20. {
  21. vrednost=vr;
  22. }
  23.  
  24. Kocka(const Kocka& k)
  25. {
  26. vrednost=k.vrednost;
  27. }
  28.  
  29. void baci()
  30. {
  31. vrednost=rand()%6+1;
  32. }
  33.  
  34. int getVrednost()const
  35. {
  36. return vrednost;
  37. }
  38.  
  39.  
  40.  
  41. };
  42.  
  43. #endif // KOCKA_HPP_INCLUDED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement