i have the following function.
Code:
void move_deck(int cards_in_play, Card deck[])
{
int i, j;
do
{
for ( i = 0, j = cards_in_play ; j < 52 ; i++, j++ )
{
deck[i] = deck[j];
}
for ( ; i < 52 ; i++ )
{
deck[i].in_play = true;
}
} while (deck[0].in_play);
print_deck(deck);
}
as it stands it works fine however it would be useful to have cards_in_play as a pointer but if i use the pointer in the for loop i get the usual warning about integer being turned into a pointer without cast,
can i use a pointer as one of the controling paramaters of a for loop or do i have to assign the value its pointing at to another variable first