Ok, that was my bad I was editing the code for web is all and missed that. In my code the variables are the same. The problem still occurs when the variables are correct, sorry for the messup on my end with posting the code.
Here is the code again with the typo fixed.
void myDeal()
{
int myDeal[4][52] = {0,0};
int p = 0; // Player Index
int d = 0; // Deck Index
int card; // Card Number (0-52)
// Seed Random Generator
srand((unsigned)time(NULL));
for (d = 0; d < 52; d++)
{
for(p = 0; p < 4; p++)
{
bool result;
do
{
card = rand()%52;
if (myDeal[0][card] == 1)
result = false;
else if (myDeal[1][card] == 1)
result = false;
else if (myDeal[2][card] == 1)
result = false;
else if (myDeal[3][card] == 1)
result = false;
else
result = true;
}while (result == false);
myDeal[p][card] = 1;
}
}
}