Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Clear Screen

Posted on 2000-05-08
1
Medium Priority
?
230 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 2800 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

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…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
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.

705 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