Hi,
im having great trouble with the curses library. (Im using Redhat 9.0).
at the start of my program i call:
initscr();
noecho();
then do some printing...
printw("Some stuff here\n"
;
do while (cQuit != 'q')
{
cQuit = getch();
if (cQuit == 'q')
{
printw("quitting...\n"
;
}
else
{
printw("you pressed %c\n", cQuit);
}
}
and at the end...
echo();
endwin();
however, when my program terminates, the shell is messed up still! no characters are output as i type and line breaks arent processed properly (the character position moves 1 line down exactly, but doesnt return to left side of screen).
Also, the message "quitting..." never gets displayed on the screen, BUT the message "you pressed %c" does get printed (ie message gets shown as long as it isnt 'q' that gets pressed).
Can anyone tell me what im doing wrong?
Thanks
im having great trouble with the curses library. (Im using Redhat 9.0).
at the start of my program i call:
initscr();
noecho();
then do some printing...
printw("Some stuff here\n"
do while (cQuit != 'q')
{
cQuit = getch();
if (cQuit == 'q')
{
printw("quitting...\n"
}
else
{
printw("you pressed %c\n", cQuit);
}
}
and at the end...
echo();
endwin();
however, when my program terminates, the shell is messed up still! no characters are output as i type and line breaks arent processed properly (the character position moves 1 line down exactly, but doesnt return to left side of screen).
Also, the message "quitting..." never gets displayed on the screen, BUT the message "you pressed %c" does get printed (ie message gets shown as long as it isnt 'q' that gets pressed).
Can anyone tell me what im doing wrong?
Thanks