Guest User

Untitled

a guest
Jul 22nd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6.  
  7. struct Player
  8.  
  9. {  
  10.     string name;
  11.     double balance = 0;
  12.     int ID;
  13.  
  14. } player;
  15.  
  16. string getName()
  17. {
  18.     return player.name;
  19. }
  20.  
  21. void setName(string nome)
  22. {
  23.     player.name = nome;
  24. }
  25.  
  26. void chargeBalance(int quantity)
  27. {
  28.     player.balance += quantity;
  29. }
  30. int getBalance()
  31. {
  32.     return player.balance;
  33. }
  34.  
  35. int getID()
  36. {
  37.     return player.ID;
  38. }
  39.  
  40.  
  41. void deletePlayer()
  42. {
Add Comment
Please, Sign In to add comment