Solved

How to clear screen

Posted on 2001-07-27
4
761 Views
Last Modified: 2011-10-03
How do I clear the screen.
Found code that uses <dos.h> and int86 function
but can't get it to work.
Any assistance would be appreciated.
0
Comment
Question by:kapai
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 10

Accepted Solution

by:
makerp earned 200 total points
ID: 6326424
what compiler

borland has clrscr(); i think

a dirty way to do it is

system("cls");

or use the windows console API

0
 
LVL 4

Expert Comment

by:rd707
ID: 6326548
If you're using VC++ there is a way round it. See code at the following URL.

http://support.microsoft.com/support/kb/articles/Q99/2/61.ASP?LN=EN-US&SD=gn&FR=0&qry=Q99261&rnk=1&src=DHCS_MSPSS_gn_SRCH&SPR=MSALL

To call this you'll need the console handle which you get by calling GetStdHandle (I think).

See:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/hh/winbase/conchar_7k9x.asp
0
 
LVL 2

Expert Comment

by:obg
ID: 6326617
if you have loaded ANSI.SYS (by adding device=ansi.sys to config.sys), you can simply puts("\x1B[2J");
0
 

Author Comment

by:kapai
ID: 6328833
Thanks guys, first in with easiest option wins.
Appreciate other suggestions but still a little over my head to use.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question