TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: VIRGIL GARNESS
from: KEVIN CAMPBELL
date: 1997-06-17 16:16:00
subject: Passing switches to programs

 > Hi All,
 > How is it possible to pass switches to bypass a Switch in a program, say
 > like from the dos prompt.  I'm trying to make a program that can run on
 > it's own normally with a menu or run in a batch file with switches to
 > bypass the menus.
void main(int argc, char* argv[]){
  // I think this is right.
  // Now simply check how many arguements have been passed.
  // There is always at least 1 parameter (the program name).
}
Have Fun - Kev
Kevin Campbell
Sysop of Deimos BBS
E-Mail: Sysop@Deimos.unmanned.co.uk
--- FMail/386 1.02
---------------
* Origin: Mail shipped from Deimos Spaceport (2:259/17)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.