greatings to all of you!!
I start learning c++ and i getting a problem with the ENTER key... i want to ignore it and i just know how.
do{
printf("\n");
printf(" A : Quadrado\n ");
printf("B : Rectangulo \n");
printf(" C : Circulo\n");
printf(" D : Triangulo\n");
printf(" E : Trapezio\n");
printf(" Indique a opcao : ");
scanf("%c",&op);}
// cin.ignore(256);
// printf(" Opcao Invalida \a");
while((op!='A')&&(op!='a')&&(op!='B')&&(op!='b')&&(op!='C')&&(op!='c')&&
(op!='D')&&(op!='d')&&(op!='E')&&(op!='e')^(op==256));
i do this and when i type an invalid key ( diferent of : a,b,c,d,e) and press enter the result is that i get 2 menus 'cause it also counts the enterkey.
it's probably simple but i just don't get it!