I would like to clear the CMD screen I have seen a few options first is
system(\'clr\');
but dont want to use system cause then it makes
Try this: it works both on Linux and Windows.
cout << "\033[2J\033[1;1H";
This is a string of special characters that translate to clear the screen command.
You can enclose this in a function like e.g. clrscr() depending on your implementation.
clrscr()