I would like to clear the CMD screen. I have seen a few options. First is
system("cls");
but I don't want to use system, cause then it makes it dependent on Windows. Same with the Unix version.
If I try
cout << string(22, '\n');
then my next line of text is at the bottom of the screen and I want it at the top. How can I clear the screen and get the text back to the top of the screen?
Thus say I have this:
cout << string(22, '\n');
cout << "************Question 1 *******" << endl;
cout << "WHO WAS THE FIRST BLACK PRESEDENT?" << endl;
cout << "(1) Obama" << endl;
cout << "(2) Bush" << endl;
cout << "(3) Jordan" << endl;
cin >> answer >> endl;
This will clear the screen then put mymenu at the bottom of the screen... How can I make it clear the screen and put the question/answers back up top of the screen?