Is clrscr(); a function in C++?

前端 未结 10 2096
忘掉有多难
忘掉有多难 2020-12-03 03:35

I\'ve looked everywhere for this function and cannot find the header files to make this work. It says clrscr() undeclared which brings me to the question. Is clrscr(); a fun

10条回答
  •  一整个雨季
    2020-12-03 04:25

    The easiest way to clear the screen in real C++ is to just send out a bunch of blank lines. Of course this is assuming that stdout is directed at the screen and not a file:

    for (int i = 0; i < 80; ++i)
         cout << "\n";
    cout << endl;
    

提交回复
热议问题