Solved

Clear Screen

Posted on 2000-05-08
1
226 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

Suggested Solutions

Title # Comments Views Activity
Which IDE to use to begin C++ training? 5 76
FMX enumerated colours 2 156
Should CArray be used for a list of pointers in C++? 19 144
I could not build boost code, 10 117
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

752 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