Solved

Basic code help

Posted on 2000-05-18
1
218 Views
Last Modified: 2010-05-18
A really, really simple question...... (dont laugh!)

I need some help on some basic code. Can someone tell me the command to clear the screen? I know what it was in C but I cant find it in C++.

Also, how can you change the colour of text?

Thanks


0
Comment
Question by:mrarse
[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 22

Accepted Solution

by:
nietod earned 10 total points
ID: 2821617
Sorry, but there is no command for this.  Even C does not have such a command.   C and C++ are written to be hardware and platform independant.  they do not assume that they are running on a compuyter that has a display, they may be runnign on a computer with a teletype or brail printer for example, and there is no way to clear the output in that case.

Now there are OS or hardware specific ways of doing this.  These are not part of C/C++, but are part of the operating system or platform you are running on.  However, these are not portable techniques.  i.e. it might work in Windows but won't even compile in Unix, etc.

What OS are you using?  What compiler?
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
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 goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.

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