hi i have a switch loop and i was wondering how i could delete the previous text when it loops
this is my code
[code=c]
loop: int Answer;
std::cout << "Enter a number of your choice. 11 or 12 ";
std::cin >> Answer;
switch (Answer)
{
default:
goto loop;
break;
case 11:
std::cout << "text";
break;
case 12:
std::cout << "text";
break;
}
[/code]
if the loop happens it just copies the "Enter a number of your choice. 11 or 12 "; and the previous one is still there so how do i make it delete the old one?
this is my code
[code=c]
loop: int Answer;
std::cout << "Enter a number of your choice. 11 or 12 ";
std::cin >> Answer;
switch (Answer)
{
default:
goto loop;
break;
case 11:
std::cout << "text";
break;
case 12:
std::cout << "text";
break;
}
[/code]
if the loop happens it just copies the "Enter a number of your choice. 11 or 12 "; and the previous one is still there so how do i make it delete the old one?
Comment