Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

CPP Find options passed from command line

#include <unistd.h>

int getopt(int argc, char * const argv[],
       const char *optstring);

extern char *optarg;
extern int optind, opterr, optopt;

#include <getopt.h>

int getopt_long(int argc, char * const argv[],
                const char *optstring,
                const struct option *longopts, int *longindex);

int getopt_long_only(int argc, char * const argv[],
                     const char *optstring,
                     const struct option *longopts, int *longindex);
Source by m.cplusplus.com #
 
PREVIOUS NEXT
Tagged: #CPP #Find #options #passed #command #line
ADD COMMENT
Topic
Name
6+7 =