Solved

# Linked list dilemma

Posted on 1998-12-03

Hi

I have to create a poker program with 5 players (who play 5 hands of poker). Each player will have a 5-node linked list (corresponding with the 5 hands played) with info on each hand (highest card, lowest card, etc). I'm having trouble with how to create the five different linked lists, insert new nodes in each list, then printing out the results. Here's the structure (node):

struct player {

int highestCard;

int lowestCard;

};

Can anyone provide an algorithm for creating the main function and also the "addData" or "insert" function? Do I have to do five different insert functions (for the 5 players) or can I do it in one function? Any help would be appreciated!