answersLogoWhite

0


Best Answer

There is no such "command" in C++, let alone Visual C++. You are probably referring to the Turbo C++ clearscreen function. It is a 3rd party, user-defined function and is therefore not part of the C++ language itself.

You can roll your own clearscreen function, of course. The following is merely an example implementation, but note that this function is not cross-platform compatible because it employs platform-specific code.

You will also need platform-specific code to reposition the cursor after clearing the screen. As it stands, the cursor will be positioned 1000 characters from the top left of the console (immediately after the last insertion position).

#include<iostream>

#include<windows.h> // Non-cross platform, Windows only!

void ClearScreen( void )

{

HANDLE hConsoleOut;

CONSOLE_SCREEN_BUFFER_INFO csbiInfo;

DWORD dummy;

COORD home = { 0, 0 };

hConsoleOut = GetStdHandle( STD_OUTPUT_HANDLE );

GetConsoleScreenBufferInfo( hConsoleOut, &csbiInfo );

FillConsoleOutputCharacter( hConsoleOut, ' ', csbiInfo.dwSize.X * csbiInfo.dwSize.Y, home, &dummy );

}

int main()

{

// print some garbage:

int max=1000;

while(max--)

std::cout<<rand();

ClearScreen();

}

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you use the clearscreen command in Microsoft visual c plus plus 6.0?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Is C plus plus same as Microsoft Visual C plus plus Express Edition?

Your question request a comparison between apples and pears. C++ is a programming language. Microsoft Visual C++ Express is one of many development tools that you can use to create programs using the C++ programming language. Microsoft Visual C++ Express supports native C++ development, and supports development in 'managed C++,' a Microsoft-specific derivative of the C++ language, aimed specifically at the .NET platform.


What is expansion of mfc in c plus plus?

The term "expansion of MFC" is meaningless. Note that the Microsoft Foundation Classes (MFC) library has nothing to do with C++. The MFC is a library designed by Microsoft for use in Microsoft Visual C++.


Does the C plus plus programming language use a virtual machine?

No, it does not. But Microsoft Visual Studio 2008 allows you to connect to a virtual machine and run your projects "sandboxed".


What is button in Visual C plus plus?

A button is more correctly named a command button. It is an ActiveX control that is derived from a CWnd object. Command buttons can be resized, restyled, and can be assigned a caption and/or an image. Programmers can override command button methods (such as OnLButtonDown/OnLButtonUp and OnKeyDown/OnKeyUp) to invoke specific actions.


Where can you download C plus plus Without fear in English for free?

There are several free implementations of C++. One of them is Microsoft's express versions of Visual Studio. See the Related Link below for more information.

Related questions

Who developed visual c plus plus?

Microsoft developed Visual C++.


Is microsoft visual c plus plus the same as visual c plus plus?

Yes. Microsoft Visual C++ is the correct name, but it is often abbreviated to MSVC++ or just VC++. They are all the same.


What is Microsoft Visual C plus plus 6.0 and why you need?

Microsoft Visual C++ 6.0 was the 6th incarnation of Microsoft Visual C++ 32-bit, released in 1998. Other than supporting legacy Windows software there is no real need for it these days. It has been surpassed several times over by Microsoft Visual C++ 2010 with Microsoft Visual Studio 11 currently in beta as of April 2012.


What has the author Chuck Sphar written?

Chuck Sphar has written: 'Learn Microsoft Visual C++ 6.0 now' -- subject(s): C++ (Computer program language), Microsoft Visual C++ 'Learn Microsoft Visual C [plus plus] 6.0 now' -- subject(s): C


Do you need Microsoft c plus plus redistributable?

If you use microsoft's "Visual C++ Compiler" whoever is going to use your program needs the redistributable installed.


Microsoft visual c plus plus rumetime library runtime error cant access game?

runtime error


Is C plus plus same as Microsoft Visual C plus plus Express Edition?

Your question request a comparison between apples and pears. C++ is a programming language. Microsoft Visual C++ Express is one of many development tools that you can use to create programs using the C++ programming language. Microsoft Visual C++ Express supports native C++ development, and supports development in 'managed C++,' a Microsoft-specific derivative of the C++ language, aimed specifically at the .NET platform.


What is expansion of mfc in c plus plus?

The term "expansion of MFC" is meaningless. Note that the Microsoft Foundation Classes (MFC) library has nothing to do with C++. The MFC is a library designed by Microsoft for use in Microsoft Visual C++.


Which c plus plus best for vista?

Microsoft Visual C++ or Embarcadero C++ Builder (formally Borland C++ Builder).


Is it safe to uninstall Microsoft visual c plus plus?

Yes, it is. Just make sure that you it though "Programs and Features" (Windows 7).


Can Microsoft visual studio c plus plus 2008 express edition work on windows xp service pack 2?

Yes, it can.


Command name for copy text in Microsoft Word?

Command name for copying text in microsoft windows is control plus c. This command can be used everywhere in windows for copying anything. You can also copy music, video, etc files.