CA> Could anyone tell me how to call dos commands or executables
CA> from within a program??
Strictly Correct Answer: You cannot, since the C++ language doesn't require
you to use DOS, and doesn't require that any form of external command be
accessible.
With the proviso that you *are* using DOS: Almost all C++ compilers for DOS
implement the Standard C++ library function system() so that it passes its
argument to the command interpreter named by the COMSPEC environment
variable. Read your compiler's library reference manual for details of the
system() function.
DOS implementations of the C++ language also provide the exec..() family of
functions that are defined by the international standard ISO/IEC 9445-1:1993
(a.k.a. "POSIX 1003.1"), and the analogous spawn..() family of functions.
These too will be documented in your compiler's library reference manual.
¯ JdeBP ®
--- FleetStreet 1.19 NR
---------------
* Origin: JdeBP's point, using Squish (2:440/4.3)
|