From 8a40fc9da5b27cad8277461e9456490d0fc622e7 Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Fri, 19 Apr 2019 09:07:14 -0500 Subject: e e --- ee1301/wk6/lab5/strap012_lab5_w_1.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ee1301/wk6/lab5/strap012_lab5_w_1.cpp b/ee1301/wk6/lab5/strap012_lab5_w_1.cpp index d3684fb..4020b98 100644 --- a/ee1301/wk6/lab5/strap012_lab5_w_1.cpp +++ b/ee1301/wk6/lab5/strap012_lab5_w_1.cpp @@ -1,10 +1,10 @@ #include #include -#include //MinGW does not compile without this included when time is involved. +#include //MinGW refuses to compile without this included when time is involved. class DeckOfCards { private: - int index=0, deck[53]; //deck is size 53 as a hack designed to prevent segfaults. + int index=0, deck[52]; public: DeckOfCards(); void shuffle(); @@ -47,7 +47,7 @@ void showHand(int hand[], const int size) { //Deck initialized with 1-52 and shuffled DeckOfCards::DeckOfCards() { - for(int i=0; i<52; i++) { + for(int i=0; i<51; i++) { deck[i]=i+1; } shuffle(); -- cgit v1.2.3