471,071 Members | 1,012 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,071 software developers and data experts.

What does the system("cls") do?

I'm beginner at c++. I wanted to know what does the following code mean?

Expand|Select|Wrap|Line Numbers
  1. (system("cls");) 
thanks
Oct 6 '06 #1
2 136311
Banfa
9,065 Expert Mod 8TB
system()

is a call to the OS command line, "cls" is a command on some operating systems that clears the screen.

In my opinion use of the system() function should be avoided, it doesn't really add anything to the operation of the program that can't be done other ways or just shouldn't be done and does make the program very non-portable.
Oct 6 '06 #2
im beginner at c++ i wanted to know what does (system("cls");) means ??
thanks
system() is used to run the DOS commands from the C, C++.. cls is the clear screen command (DOS cmd)..
similarly you can use system("dir");

or

char s="cd bin";
system (cd);
Oct 6 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by could ildg | last post: by
7 posts views Thread by newseater | last post: by
7 posts views Thread by ~neil~ | last post: by
1 post views Thread by xiaolim | last post: by
5 posts views Thread by akonsu | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.