Page 1 of 1
N00b Question concearning DOS console apps in C++
Posted: Sun Mar 28, 2010 7:35 am
by dream_coder
Hey all I have just joined these forums. I am attempting a text based adventure game. I was just wondering if there was some sort of C++ command that will clear the screen in C++ in a DOS console app.
Re: N00b Question concearning DOS console apps in C++
Posted: Sun Mar 28, 2010 7:45 am
by Milch
Hey and welcome!
Code: Select all
#include <windows.h>
system("cls");
Should do it!
Next time try to google it
Re: N00b Question concearning DOS console apps in C++
Posted: Sun Mar 28, 2010 7:57 am
by MrDeathNote
Milch wrote:Hey and welcome!
Code: Select all
#include <windows.h>
system("cls");
Should do it!
Next time try to google it
^This
Re: N00b Question concearning DOS console apps in C++
Posted: Sun Mar 28, 2010 8:11 am
by dream_coder
Thanx for that. It works a treat. I will try gharder with google next time.
Re: N00b Question concearning DOS console apps in C++
Posted: Sun Mar 28, 2010 11:57 am
by ultimatedragoon69
if your on a mac you could also use clear, here's my clear screen functions->
Code: Select all
void EasySystem::cls()
{
#ifdef WIN32
system("CLS");
#else
system("clear");
#endif
}