Advertisement
Guest User

Untitled

a guest
Jun 29th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. Deck::Deck()
  2. {
  3.   this->size = 52;
  4.   this->top = 0;
  5.   this->cards = new Card[size];
  6. }
  7. Deck::Deck(const Deck &original)
  8. {
  9.     this->size = original.size;
  10.     this->top = original.top;
  11.     this->cards = new Card[this->size];
  12.     for(int i = 0; i < this->size; i++)
  13.       this->cards[i] = original.cards[i];
  14. }
  15. Deck::~Deck()
  16. {
  17.   delete[] cards;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement