clearing screen without inline assem or grapics header

This is a discussion on clearing screen without inline assem or grapics header within the C++ Programming forums, part of the General Programming Boards category; It is possible to clear the screen in a VC 6 console app using only iostream.h? If so, how? I've ...

  1. #1
    Casual Visitor
    Join Date
    Oct 2001
    Posts
    350

    clearing screen without inline assem or grapics header

    It is possible to clear the screen in a VC 6 console app using only iostream.h? If so, how? I've already tried counting and deleting lines, but it didn't do what I wanted. TIA
    I haven't used a compiler in ages, so please be gentle as I try to reacclimate myself. :P

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    the answer to this question is in the FAQ. Read kermi3's thread at the top of the forum!
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    Casual Visitor
    Join Date
    Oct 2001
    Posts
    350
    I haven't used a compiler in ages, so please be gentle as I try to reacclimate myself. :P

  4. #4
    Registered User
    Join Date
    Oct 2001
    Posts
    2

    Exclamation blah

    The " conio.h " is not a standard header, therefor clrscr(); will not work because its not even defined in conio.h =) So... I don't think his question was answered correctly. I gave it a try in one of my programs and it doesn't work, all you will get is an error stating "clrscr(); not defined". There must be another header file that contains a function to clear the screen, if you find it...let me know =)

    -MuDvAyNe

  5. #5
    zen
    zen is offline
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    The " conio.h " is not a standard header, therefor clrscr(); will not work because its not even defined in conio.h =) So... I don't think his question was answered correctly.
    Yes, there's no standard way to clear the screen but the FAQ offers 7 alternatives, one of which will probably work.

    If you only want to use iostream then use option 2, but if you're using MSVC then you may aswell use the 'windows option'.
    zen

  6. #6
    Casual Visitor
    Join Date
    Oct 2001
    Posts
    350
    clrscr() is Borland I *think*, but I found the answer in one of MS's KB articles. Thanks to both Zen and TechPhreak for at least offering something.
    I haven't used a compiler in ages, so please be gentle as I try to reacclimate myself. :P

  7. #7
    Unregistered
    Guest
    system("cls");

  8. #8
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552
    clrscr() is not just Borland. It is also in DJGPP. I know, I've used it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Obtaining source & destination IP,details of ICMP Header & each of field of it ???
    By cromologic in forum Networking/Device Communication
    Replies: 1
    Last Post: 04-29-2006, 03:49 PM
  2. Clearing The Screen
    By kimmiej in forum C++ Programming
    Replies: 26
    Last Post: 12-08-2001, 01:08 PM
  3. FAQ: clearing screen
    By Unregistered in forum FAQ Board
    Replies: 2
    Last Post: 10-14-2001, 08:17 PM
  4. sub routines and clearing the screen
    By Leeman_s in forum C++ Programming
    Replies: 2
    Last Post: 10-01-2001, 09:31 PM
  5. Clearing screen with MS VC++ 6
    By Narciss in forum C Programming
    Replies: 2
    Last Post: 09-23-2001, 08:22 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21