moldrien
unread,Dec 14, 2010, 8:01:40 AM12/14/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wascana
Hi all,
I'm writing simple programs that, for instance, show a menu to the
user, he choses an option, it's serviced (say printing a message), and
then shows the menu again. I would like to clear the screen and re-
print the menu. In order to accomplish this I use this code:
#include <windows.h>
#define clrscr() system ("cls")
void gotoxy(int x, int y)
{
COORD coord;
coord.X = x;
coord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
(as you can see I also want to use the known gotoxy in a near future)
BUT it doesn't work. The program shows a non printable character as a
sall rectangle but do not clear the console view.
So, is there another way to get this done?, or is there an equivalent
of clrscr in wascana?
I think this problem has to do with encoding used in console view.
I've tried with a diferent one (I opened a thread related with this
some days ago) without success.
Regards, and thanks in advance
Fernando