VG>How is it possible to pass switches to bypass a Switch in a program, say
VG>like from the dos prompt. I'm trying to make a program that can run on
VG>it's own normally with a menu or run in a batch file with switches to
VG>bypass the menus.
Just check argv & argc in main(). I'd guess that if there are valid
arguments passed on the command line, you could bypass the menu and just
do what needs to be done.
You can either write your own argument processor and use one of the
several getopt() functions that are floating around (including in the C
Snippets release.)
--- QScan/PCB v1.19b / 01-0162
---------------
* Origin: Jackalope Junction 501-785-5381 Ft Smith AR (1:3822/1)
|