Quick C Question- ANSI driver escape comands

Discussion in 'Software' started by iamien, Oct 30, 2002.

  1. iamien

    iamien Cptn "Eh!"

    Ok learning C atm
    I'm trying to apply escape squences to do things like clear the screen, but i cannot seem to get it to work
    #include <stdio.h>
    void main(void)
    {
    printf(" \033[2J"); /* tried it using octal, no luck */
    printf("Esc[2J"); // tried it using plain esc, no dice
    }

    Thats what i figured it should be like to clear the screen but my result using octal is an arrow pointing left followed by [2J and for normal is Esc[2J.
    What am i doing wrong :) while this in itself may seem trivial, i dont want to move on in book until i figure out how to make these work.
    I have loaded the ANSI Decive drivers into system by adding DEVICE=C:\DOS\ANSI.SYS
    too config.sys
    Thanks
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds