N00b Question concearning DOS console apps in C++
Moderator: PC Supremacists
-
- Chaos Rift Newbie
- Posts: 34
- Joined: Sat Mar 27, 2010 5:16 pm
N00b Question concearning DOS console apps in C++
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.
- Milch
- Chaos Rift Junior
- Posts: 241
- Joined: Sat Jul 11, 2009 5:55 am
- Programming Language of Choice: C++
- Location: Austria, Vienna
Re: N00b Question concearning DOS console apps in C++
Hey and welcome!
Should do it!
Next time try to google it
Code: Select all
#include <windows.h>
system("cls");
Next time try to google it
Follow me on twitter!
- MrDeathNote
- ES Beta Backer
- Posts: 594
- Joined: Sun Oct 11, 2009 9:57 am
- Current Project: cocos2d-x project
- Favorite Gaming Platforms: SNES, Sega Megadrive, XBox 360
- Programming Language of Choice: C/++
- Location: Belfast, Ireland
- Contact:
Re: N00b Question concearning DOS console apps in C++
^ThisMilch wrote:Hey and welcome!
Should do it!Code: Select all
#include <windows.h> system("cls");
Next time try to google it
http://www.youtube.com/user/MrDeathNote1988
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
-
- Chaos Rift Newbie
- Posts: 34
- Joined: Sat Mar 27, 2010 5:16 pm
Re: N00b Question concearning DOS console apps in C++
Thanx for that. It works a treat. I will try gharder with google next time.
- ultimatedragoon69
- Chaos Rift Regular
- Posts: 122
- Joined: Tue Oct 28, 2008 1:57 pm
- Current Project: Pangea's quest (text ~tile~ based rpg)
- Favorite Gaming Platforms: Dreamcast, PC, playstation 1, Virtual Boy, Snes
- Programming Language of Choice: c++
- Contact:
Re: N00b Question concearning DOS console apps in C++
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
}