Click here to Skip to main content
15,353,676 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi all,
recently i started coding in C language (my specialty is c# and php and i am new to c commands).
Im looking for some functions to clear screen from line 'x' up to end of screen and i just find
C++
system( "cls" );
that do my propose but from first line up to end (whole of screen).
so any recommended solution acceptable and thanks in advance.. ;)

-regards
amir nasrollahi
Posted

1 solution

See http://www.robvanderwoude.com/ansi.php[^] for the escape sequences that you can try. However, you may find it better to work on a simple Windows application where you have better control of the screen.
   
Comments
Amir Mohammad Nasrollahi 5-Jan-15 7:04am
   
Im forced to use console and c both!!
Ansi is my last choice so i wait for other answers but thanks for your solution.
Richard MacCutchan 5-Jan-15 7:06am
   
Then using the ANSI sequences is the only way you can do it.
Amir Mohammad Nasrollahi 5-Jan-15 7:08am
   
i saw a solution that they use move(x,y) and then clrtoeol() and then back to first x y position.. i test it but didn't worked..
Richard MacCutchan 5-Jan-15 7:14am
   
That is using the old MSDOS graphics library that has been out of date for years. I am not sure why you are having to work with such old technology, when Windows is the obvious choice.
Amir Mohammad Nasrollahi 5-Jan-15 7:19am
   
this is a competition that we must use and research on old technology..
   
If this is a competition, it's probably unfair to use anyone's help.
—SA
Amir Mohammad Nasrollahi 6-Jan-15 12:37pm
   
no too like a real competition...
don't worry ;)
   
:-)
   
Agree, a 5.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900