Switching on command line args
initSwarm(1,argv);
if (argc == 1) {
...
The argc variable and argv array come from the command line
We 'trick' initSwarm to think there are no arguments (so it doesn't parse argv)
argc==1 means there were no arguments
Previous slide
Next slide
Back to first slide
View graphic version