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

前端 未结 10 2132
忘掉有多难
忘掉有多难 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:19

    On Unix-like systems you can use VT100 escape codes.

    std::cout << "\033[2J" << std::flush;
    

    See http://www.termsys.demon.co.uk/vtansi.htm

提交回复
热议问题