#include <iostream>
#include <cstdlib>
#include <ctime>
#include <string>
// if you want your cards to have more shape then numbers
enum Suit { Clubs , Spades , Diamonds , Hearts };
class Card_Info
{
public:
int value;
std::string face;
Suit suit;
};
void Swap( int &a , int &b )
{ int c = a; a = b; b = c; }
void Shuffle ( int Deck2[] , int size )
{
int i, r;
for (i = 0; i < size; i++)
{
r = rand()%size;
Swap( Deck2[i] , Deck2[r] );
}
}
int main()
{
srand((unsigned)time(0));
int Deck[52] , i;
// build the deck
for (i = 0; i < 52; i++)
{
Deck[i] = i + 1;
}
// shuffle the deck
Shuffle( Deck , 52 );
// print shuffle deck
for (i = 0; i < 52; i++)
{
std::cout << Deck[i] << "\n";
}
return 0;
}