Define a function addToPile with the following prototype: cardt *addToPile(cardt *pile, cardt *card); It should place ca
Posted: Fri May 20, 2022 12:44 pm
This is for a blackjack game where the pile will be either the
player or the users pile and the card will be a card dealt by
another function used in the main.
Based around struct below. A "pile of cards" or a "pile" in
the descriptions below will be a pointer-to-card (struct card
* or, equivalently, cardT *). If a pile is empty, then
the pointer will be NULL. Otherwise, it should be thought of a
the top (or first)
Define a function addToPile with the following prototype: cardt *addToPile(cardt *pile, cardt *card); It should place card at the top of pile., and return the new head of the pile. If card is NULL, do nothing and return the existing head.
player or the users pile and the card will be a card dealt by
another function used in the main.
Based around struct below. A "pile of cards" or a "pile" in
the descriptions below will be a pointer-to-card (struct card
* or, equivalently, cardT *). If a pile is empty, then
the pointer will be NULL. Otherwise, it should be thought of a
the top (or first)
Define a function addToPile with the following prototype: cardt *addToPile(cardt *pile, cardt *card); It should place card at the top of pile., and return the new head of the pile. If card is NULL, do nothing and return the existing head.