cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Windows Programming
passing parameters to a file
passing parameters to a file
May 23, 2014 at 1:14pm UTC
popa6200
(48)
I was wondering how you could pass parameters to a program?
e.g:
dir /O
I was wondering how
you could pass arguments,
/O
,
to a program.
Last edited on
May 23, 2014 at 1:14pm UTC
May 23, 2014 at 1:47pm UTC
plexus
(147)
That depends on the library you want/have to use.
In the Windows CRT there's a function called
_spawnl()
.
http://msdn.microsoft.com/en-us/library/wweek9sc.aspx
In the Win32 lib there's:
CreateProcess()
.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx
In dotNet it's the class: System::Diagnostics::Process
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx
There are probably other functions in other libs, but I can't remember off the top of my head.
Topic archived. No new replies allowed.