+ 3
What is system() in c++?
How to use it?
3 Antworten
+ 6
It calls the systems command processor. You can execute pretty much anything that is executable with it.
Do not get into the habit of using it. It is terrible for security. See here:
http://www.cplusplus.com/forum/articles/11153/
Basically. You can never be sure what you are really executing. Is pause really pause? Is it even available? Is it a virus? How can you be sure?
0
system("cd /path/to/myFolder");
As an example, this will move the current command line folder into that path.
- 2
attribute