Function clrscr in C and C++

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

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

5条回答
  •  死守一世寂寞
    2020-12-03 19:19

    Also, as an alternative to conio.h, you can try using ncurses, which provides terminal handling, cursor management, colors and a lot of other functionalities. In particular, it provides the clear() function with a similar functionality to the clrscr() function you mentioned. For Windows (which must be your case), there is PDCurses that employs the same API. In particular, ncurses complies with the XSI Curses base specification, and it is widely adopted; you should stick to it if any degree of portability matters.

提交回复
热议问题