#include "CLO.h" #include #include main(int argc, char **argv) { // Declare some variables // Here we have float type command line options CLOfloat a(2.5,"ahello","foo"); CLOfloat b(3,"b","foo"); float c; a=c=a=b=2.6; a=c; // int command line options CLOint d(2,"ddog","optional something"); d=a=d=3; // flags are booleans, they start false, and get turned true if set CLOflag e("eele","turn on elephants"); // These are char[] command line options CLOchar255 f("Test","ffrog","Frog option"); puts(f); strcpy(f,"Frog2"); // // Checks all command line options, and sets up variables // The main shebang // CLO::parseArgs(argc,argv); // Print out a bunch of info so we can see what happened printf ("a %f %c %s %s\n",(float)a,a.optionchar,a.optionname,a.optiondescript); printf ("b %f %c %s %s\n",(float)b,b.optionchar,b.optionname,b.optiondescript); printf ("d %d %c %s %s\n",(int)d,d.optionchar,d.optionname,d.optiondescript); printf ("e %d %c %s %s\n",(int)e,e.optionchar,e.optionname,e.optiondescript); printf("f %s\n",(char *)f); printf ("Option String '%s'\n",CLO::getOptionString()); }