Function clrscr in C and C++

前端 未结 5 953
鱼传尺愫
鱼传尺愫 2020-12-03 18:43

Does today\'s C or C++ compilers use the clrscr system function?

5条回答
  •  情歌与酒
    2020-12-03 19:28

    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

提交回复
热议问题