Jump to content
  • Advertisement
Sign in to follow this  
Marz

Clear screen?

This topic is 4903 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is there a clear screan command or function for C++ console based? If so which header do I need to include. Thank you.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Is there a clear screan command or function for C++ console based?


There are platform-specific solutions. Windows (the second solution given is probably faster, if that's a concern, since it doesn't need to spawn a shell process), Linux.

Quote:
system("cls");


Well, it works if you're using Windows...

sh: line 1: cls: command not found

On the other hand, system("clear"); works for me. [smile]



Quote:
stdlib.h


<cstdlib> [grin]

Share this post


Link to post
Share on other sites
Quote:
Original post by Fruny
Quote:
stdlib.h


I have been outsourced by Fruny [lol]. I should learn the new C++ standard...really. What's funny is that I really never learned C before. I started out with 'C++' in CS 4 years ago and only learned that. I picked up C along the way somehow... yet it is what I use more of. It's all the same to me [wink]

- Drew

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!