468,490 Members | 2,573 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,490 developers. It's quick & easy.

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 131542
Banfa
9,055 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
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.