C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 7th, 2003, 03:18 PM
Shunoshi Shunoshi is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Minnesota
Posts: 1 Shunoshi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Shunoshi
Unhappy Clearing the screen in a C++ console program.

Hello all,

This is my first time posting here. My question, I'm guessing, is a relatively easy one to answer.

I've recently just gotten back into C++ and am starting at the beginning again with console programming. I decided to make a cribbage game since it is one of my favorites.

However, I am having a slight problem. I can't remember what function you use to clear the screen of all text. I've searched around a bit and didn't find anything to help me...either that, or I'm blind. Either way, I can't figure it out.

I hope this is an easy one to answer...it would help me out a ton.

Thanks in advance....

Reply With Quote
  #2  
Old February 8th, 2003, 12:54 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 18
try: clrscr()

Reply With Quote
  #3  
Old February 8th, 2003, 05:29 PM
bigBA bigBA is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 1 bigBA User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to bigBA
clearing the screnn per ansi escape sequenz

you can clear the text screen with an ansi escape sequenz:

pritnf("\033[2J");

Reply With Quote
  #4  
Old January 23rd, 2005, 05:16 PM
ubergeek ubergeek is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2005
Posts: 600 ubergeek User rank is Private First Class (20 - 50 Reputation Level)ubergeek User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 22 h 40 m 27 sec
Reputation Power: 14
Send a message via AIM to ubergeek
or:
Code:
system("cls");


for this you need to
Code:
#include <cstdlib>

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > Clearing the screen in a C++ console program.


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap