Solved

Basic code help

Posted on 2000-05-18
1
176 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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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 difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

772 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now