Solved

Clear Screen

Posted on 2000-05-08
1
227 Views
Last Modified: 2010-04-02
How do I clear the console screen? I tried all the ways, nothing works. clrscr() does not. I need it VERY urgent, it's killing me. Someone HELP.
0
Comment
Question by:ujikol
[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
1 Comment
 
LVL 8

Accepted Solution

by:
GEM100 earned 700 total points
ID: 2789712
First of all, clrscr(); is working in DOS, but not for console window.
Well, because there is no Win32 API you can use system function:

#include <stdlib.h>
#include <iostream.h>
void main()
{
system("cls");
}

You can also write a function to programmatically clear screen, but this should also work.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

624 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