i stumble onto a problem on comparing strings
can someone help me again? I have manage the checking on the string of input but i cant seem to code the correct part on comparing M and F, its about the gender input. User can only input M,m,F or f.
PHP Code:
void val_gen(void)
{
char msg[]="Invalid Input!!! Accepts only M or F only";
char v_flag;
do
{
gotoxy(45,15); clreol();
fflush(stdin);
gets(mem_temp.mem_gen);
v_flag = val_gsize(1, mem_temp.mem_gen);
if (v_flag =='Y')
{
v_flag=val_gchar(mem_temp.mem_gen);
if(v_flag=='N')
err_msg(msg);
}
}
while (v_flag=='N');
caps_str(mem_temp.mem_gen);
}