I'm sure I'm doing something wrong here. I can't figure out what tough.
This is the function that gives trouble:
Code:
void ten_and_up(int random, char *pjackEtc)
{
if (random == 11)
{
pjackEtc = "Jack";
puts("Jack");
}
else if (random == 12)
{
pjackEtc = "Queen";
puts("Queen");
}
else if (random == 13)
{
pjackEtc = "King";
puts("King");
}
else if (random == 14)
{
pjackEtc = "Ace";
puts("Ace");
}
else
{
puts("***Error in void ten_and_up***");
}
return;
}
This is the prototype:
Code:
void ten_and_up (int random, char *pjackEtc);
And this the function call:
Code:
ten_and_up(random, pjackEtc);
The function executes the else statement.
Thank You.