#include #include #include struct card { int colour; int number; }; struct cards { struct card deck[150]; }; class deck { private: int no_of_cards; struct card play_deck[150]; public: deck(char[20]); void load_cards(char[20]); void shuffle_cards(void); struct card pickup_card(void); void return_card(struct card); struct cards get_deck(void); int get_no_of_cards(void); }; deck::deck(char name[20]) { no_of_cards = 150; deck::load_cards(name); deck::shuffle_cards(); } void deck::load_cards(char name[20]) { int length=0, i=0; ifstream cards_in(name, ios::in); cards_in>>length; for(i=0;i>play_deck[i].colour>>play_deck[i].number; } cards_in.close(); no_of_cards=length; } void deck::shuffle_cards(void) { srand(time(0)); bool taken[150]; struct card temp[150]; int ran = 0; bool take = false; for(int i=0;i