Sign in to follow this  

Clear screen?

This topic is 4693 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

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

This topic is 4693 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this