On Sun, Mar 15, 2009 at 4:39 PM, Brett McCoy <[email protected]> wrote:
> On Sun, Mar 15, 2009 at 11:28 AM,  <[email protected]> wrote:
>> Please explain more ab out the  IOCTL calls.
>>
>> I tried to clear the screen  with something like
>> printf("\x1B[2J"); but I  couldn't get it to work.
>
> This worked for me under gcc (CygWin) in the CygWin bash shell
>
> $ cat clrscr.c
> #include <stdio.h>
>
> int main() {
>
>  printf("\x1B[2J");
>  return 0;
> }
>
> Haven't tried it under VC++ under the cmd shell but this kind of thing
> used to work under DOS if you had ANSI.SYS loaded.

WinXP SP3 (dunno about ansi.sys, but suspect not) - VC++2008 Express
Edition doesn't work:

Ctrl-F5:

←[2JPress any key to continue . . .

VC++2008 Command prompt:

C:\Documents and Settings\Paul\My Documents\Visual Studio
2008\Projects\clrscr\Debug>clrscr.exe
←[2J
C:\Documents and Settings\Paul\My Documents\Visual Studio
2008\Projects\clrscr\Debug>

Normal command prompt - same as above.

-- 
PJH

http://shabbleland.myminicity.com
http://www.chavgangs.com/register.php?referer=9375

Reply via email to