well i'm trying to get my shuffler to work but i keep getting one. any ideas?
#include <cstdlib>
#include <string>
#include <ctime>
#include <iostream>
using namespace std;
const int number_of_cards = 52;
void shuffle(int list[], int size)
{
srand(time(0));
for (int i = 0; i < size; i++)
{
int index = rand() % number_of_cards;
int temp = list[i];
list[i] = list[index];
list[index] = temp;
}
}
int main()
{
int deck[number_of_cards];
const string suits[] = {"Clubs", "Diamonds", "Hearts", "Spades"};
const string ranks[] = {"Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack" "Queen", "King"};
int value[]={1,2,3,4,5,6,7,8,9,10,10,10,10};
int i = 0;
for(i = 0; i < number_of_cards; i++)
deck[i] = i;
shuffle(deck, number_of_cards);
cout << value[deck[i]%13];
getchar();
return 0;
}