Hi all.
I know that there is a way to remove outputted text from the console, yet I don't know how and there isn't anything on it in my book. I want to use it to clean up the text adventure game that i'm making. anybody out there have any ideas?
As far as I know, removing specific lines and stuff is not possible, but clearing the entire screen is.
system("cls");
People suggest not to use system commands, but no one ever offers an explanation as to why, so the way I do it is to make a function that simulates clearing the screen.
1 2 3 4
void cls() {
for (int i = 0; i < 15; i++)
cout << "\n";
}
EDIT: There actually is a way to simulate removing specific words and lines, etc. It involves using a position handle and writing text to a specific position on the screen. You could simply write a bunch of spaces where you want to remove a word/line etc. I'm not very experienced with it, so I wouldn't be much help with it. Maybe someone else knows more about it though.