//Deck Class
#include<iostream>
#include<stdlib.h>
using namespace std;
class Deck{
int Cards[51];
public:
Deck();
void Display();
void Shuffle();
};
Deck::Deck(){
for(int n = 0; n < 52; n++){
Cards[n]=n;
}
}
void Deck::Display(){
for(int n = 0; n < 52; n++){
cout << n+1 << ". " << Cards[rand()%51] <<endl;
}}
void Deck::Shuffle(){
for(int n = 0;n < 52; n++){
int r=n+(rand()%(52-n));
int temp=Cards[n];
Cards[n]=Cards[r];Cards[r]=temp;
}}
This is what I have so far for card class, I want to categorize them into the suits then to the number they are. So like a two of clubs would be assigned to number 22 or something. How would I get it so it can detect what is a club and what isn't, same with numbers/face cards... I was told by a friend to use Enums but I wanted to know if there was any more efficient way