Clear Screen in mingw

2,244 views
Skip to first unread message

Crashh

unread,
Feb 23, 2012, 7:48:29 AM2/23/12
to bms-lug
Hey,
How do we clear the screen in mingw compiler? It may seem like a silly
question, but i'm a noob at programming and am unable to get this
right. I tried clrscr(), system("cls"), system("clear"). I also
googled and found this:
void ClrScr(void)
{
COORD a = {0,0};
DWORD nwrite;
FillConsoleOutputAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 0x07,
2000, a, &nwrite);
}
, which didn't work. Help would be much appreciated. Thanks!

Shantanu Tushar Jha

unread,
Feb 24, 2012, 9:29:48 PM2/24/12
to bms-lug
Hi,

Usually not many people attempt to clear screen in their program,
because well, in modern terminals it wont make much difference anyway.
Even I haven't tried it on mingw but seems people at
http://www.codeguru.com/forum/showthread.php?t=363202 have solved the
problem. See if that helps.

Cheers,
Shantanu

Harsh Jain

unread,
Feb 26, 2012, 9:30:41 AM2/26/12
to bms...@googlegroups.com
Thanks a lot!

--
You received this message because you are subscribed to the Google Groups "bms-lug" group.
To post to this group, send email to bms...@googlegroups.com.
To unsubscribe from this group, send email to bms-lug+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bms-lug?hl=en.


Reply all
Reply to author
Forward
0 new messages