wow! i didnt know that!..ok..im really close
Code:
void menu()
{
while(ask != 'q'){
rewind(stdin);
printf("p: point , r: rectangle , d: draw , q: quit\n");
scanf("%c",&ask);
if(ask == 'p'){
scanf("%d,%d",&one , &two);
p(one , two);}
else if (ask == 'r')
{
scanf("%d,%d,%d,%d",&one , &two , &three , &four);
r(one , two , three , four);
}
else if(ask == 'd')
d();
else
q();
}
}
i have this but if i do this it gives me just the blank board without any points or values..and if i remove the rewind(stdin) it gives me 4 outputs but even those are wrong.. what am i doing wrong ?