Keep getting RUNTIME ERROR CHECK FAILURE: stack around variable raid6 is corupt. Here is the peice of code:
Code:
/* First we must determine if we are using a RAID-6 device*/
printf("Is this a RAID-6 device Y/N: ");
scanf ("%s", &raid6);
getchar();
/*if yes or no is not entered we get stuck in this loop*/
while (raid6 != 'Y' && raid6 != 'N' && raid6 != 'y' && raid6 != 'n')
{
printf ("Invalid input, please enter Y/N: ");
scanf ("%s", &raid6);
getchar();
}
I always have problems with the scanf buffer yet I continue to use it. Is there a way to clear this in between steps?