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

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

    you can use the system cls command to clear the output screen..

    clrscr() is from turbo c++, inside conio.h and conio.h is "non standard", and as such should be probably avoided. example

        #include
        main()
        {
        some code....;
        system("cls");
        some more code;
        }
    

    its tested and works.. i use dev c++ with mingw compiler.. :)

提交回复
热议问题