Yep, push and pop is much easier to do and makes much more sense. Thanks for the help.
... and that code is pretty embarrassing after I figured out how a single linked list works
Type: Posts; User: MRM
Yep, push and pop is much easier to do and makes much more sense. Thanks for the help.
... and that code is pretty embarrassing after I figured out how a single linked list works
void deal(c *p, c *p1, c *p2)
{
int i=1;
while (i<=52)
{
if (i%2==0)
{
p1=p;
The deck is already shuffled and in a linked list. From that i need to deal it out to two hands which need to also be represented as linked lists
I have a linked list representing a deck of 52 cards. I now need to deal the cards and have a linked list for each hand. Any suggestions on how to do that would be appreciated.