Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Curses on unix :)

Status
Not open for further replies.

VBMan

Programmer
Jul 1, 2000
49
US
Someone please tell me how to clear the screen on a unix box in C. I'm trying to write a menuing program that clears the screen when you choose different stuff. Curses isn't the only thing i'll use its just what i've been trying. This DOESN'T work so... someone enlighten me.

/* This does not work */

#include <stdio.h>
#include <curses.h>

main(){
initscr();
erase();
printf(&quot;I'm on a clean screen :)\n&quot;);
}





Thanks,
Ben

 
friend i also tried curses but there is some
problem with the header and library in solaris forte c++

if you want to clear the screan using unix utility
do this

#include<stdlib.h>

main()
{
system(&quot;clear&quot;);//this clears the screan


//your code
}

see if it helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top