Click to See Complete Forum and Search --> : clear screen in console
AlexanderS
May 29th, 2002, 08:56 AM
Hi,
how can I clean the console screen?
Okay, I can use system("clear"); or system("cls"); but I don't want to use system commands.
Thanks,
Alexander
vikramn
May 29th, 2002, 10:34 AM
Use BIOS/DOS calls .. Some Interrupt.
You will have to code Assembly in C/C++
Cheers
V
Paul McKenzie
May 29th, 2002, 10:52 AM
Originally posted by AlexanderS
Hi,
how can I clean the console screen?
Okay, I can use system("clear"); or system("cls"); but I don't want to use system commands.
Thanks,
Alexander If your console is 25 lines:
#include <iostream>
void ClearConsole( )
{
for ( int i =0; i < 25; ++i )
std::cout << std::endl;
}
Other than that, there is no standard way in C++ to clear the console, or do any kind of console related programming. All of this is OS and compiler dependent, so you need to do research on the functions that your compiler supports in doing these things, or check how your OS does these things.
Regards,
Paul McKenzie
Zeeshan
May 29th, 2002, 01:46 PM
Visit here
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q99261
Hope it helps.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.