Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <cstdlib>
  4. #include <ctime>
  5.  
  6. using namespace std;
  7.  
  8. class player
  9. {
  10. public:
  11.     string name;
  12.     int Accuracy;
  13.     int Bulls_Hit;
  14.     int DartsThrown;
  15.  
  16.     //functions
  17.     void PrintAll()
  18.     {
  19.         cout << name << endl;
  20.         cout << Accuracy << endl;
  21.         cout << Bulls_Hit << endl;
  22.         cout << DartsThrown << endl;
  23.     }
  24.  
  25.     void Game()
  26. };
  27.  
  28.     int main()
  29.     {
  30.         player Joe;
  31.         Joe.name = "Joe";
  32.         Joe.Accuracy = 71;
  33.         Joe.Bulls_Hit = 0;
  34.         Joe.DartsThrown = 0;
  35.  
  36.         player Sid;
  37.         Sid.name = "Sid";
  38.         Sid.Accuracy = 73;
  39.         Sid.Bulls_Hit = 0;
  40.         Sid.DartsThrown = 0;
  41.  
  42.         Joe.PrintAll();
  43.         Sid.PrintAll();
  44.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement