I was trying to write statements that failed to clear screen which were written to accept some data from the keyboard which needs to be displayed later by clearing the displayed contents to interact with users.
How can write statement of clear screan?
Collapse
X
-
You need special non-standard code to clear a screen in C.
C was invented before graphic display screens. What you had in those days was a teletype. Paper feeds from a roll and is typed on by the console teletype.
So there'e \n to feed one line of paper and \r to go back to col 1 on the current line. etc... But no clear the screen stuff.
I knew one guy who wrote a loop displaying enough \n's that the display rolled off the top of the screen.
This is why OS's like Windows have there own graphic libraries which you must use to control your screen.
Comment