-
Overview about command line parameters
Command-line parameters are passed to a program at runt-time by the OS when the program is requested by another program, such as a command interpreter ("
shell
") like cmd.exe on WIndows orbash
on Linux and OS X.The user types a command and the shell calls the OS to run the program.
The uses for command-line parameters are various, but the main two are:
- Modifying program behaviour - command-line parameters can be used to tell a program how you expect it to behave;
- Having a program run without user interaction - this is especially useful for programs that are called from scripts or other programs;
-
The command-line
Adding the ability to parse command-line parameters to a program is very easy. Every C and C+&
C++实现可执行文件输入参数执行
最新推荐文章于 2022-09-29 15:26:48 发布