Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • Last Modified:

Clear Screen

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
ujikol
Asked:
ujikol
1 Solution
 
GEM100Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now