#include <iostream>

enum suit {hearts, diamonds, spades, clubs};
enum value {two, three, four, five, six, seven, eight, nine, ten, jack, queen, king, ace};

struct card 
{
    value v;
    suit s;
};
static const int num_players = 4;

static const char* suits[] = {"Hearts", "Diamonds", "Spades", "Clubs"};
static const char* values[] = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King", "Ace"};

std::ostream& operator<<(std::ostream &out, const card &c)
{
	out << values[c.v] << " of " << suits[c.s];
	return out;
}

void get_winner(const card (*hands)[num_players][2], const card (*mid_cards)[5])
{
    for (int i = 0; i < 5; i++) {
        std::cout << "Middle card " << i + 1 << ": " << (*mid_cards)[i] << "\n";
    }

    for (int i = 0; i < num_players; i++) {
        std::cout << "Player " << i + 1 << "hand: " << (*hands)[i][0] << ", " << (*hands)[i][1] << "\n";
    }
}

int main()
{
    card hands[num_players][2];
    card mid_cards[5];
    // fill hands and mid_cards with card structs
    hands[0][0] = card {jack, hearts};
    hands[0][1] = card {nine, spades};
    hands[1][0] = card {ace, clubs};
    hands[1][1] = card {ace, hearts};
    hands[2][0] = card {three, diamonds};
    hands[2][1] = card {seven, spades};
    hands[3][0] = card {eight, diamonds};
    hands[3][1] = card {nine, clubs};
    mid_cards[0] = card {five, clubs};
    mid_cards[1] = card {king, hearts};
    mid_cards[2] = card {queen, spades};
    mid_cards[3] = card {two, clubs};
    mid_cards[4] = card {ace, hearts};
    get_winner(&hands, &mid_cards);
}