Solved

Basic code help

Posted on 2000-05-18
1
196 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
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
why "." vs "->" 23 120
Need 'Configuration File' Management Library for C++ Project 1 516
C Language combined operators 28 109
PDF library for Delphi 2 121
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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 be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

773 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