The word “clreol” is the short of clear end of line. The clreol function is used to clear a line from the currunt cursor position up to the end of line. It clears all characters from the cursor position, the other text printed on the screen is not cleared.
In C++, the declaration of clreol() function as looks like this:
The declaration of this function indicates that no parameter is passed to this function. This function returns no value. The general syntax to call this function is as follows:
Example Program of clreol() Function
This following C++ program clears the line number 20 from first column to the last column.
using namespace std;
In this program, first statement (gotoxy) shifts the cursor at the first column of line number 20. The second statement clears this line up to the end of line.
Summary of Clreol
The following chart illustrates the summary of tutorial of c++ clreol function.