devxlogo

System commands

System commands

Question:
Is there a way for me to issue system commands (for example, DOS commands: dir, md temp, etc.) from within a C++ program?

Answer:
You can use the C system() library routine. This function takes a single argument: a string specifying a DOS command.

devx-admin

Share the Post: