Registry / cli / getopt

getopt

JSON →
library0vcpkgunverified

The getopt and getopt_long functions automate parsing of typical Unix command line options.

vcpkg install getopt
INSTALL
IMPORT
SIG · GETOPT
G
getopt
clicppv0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

getopt.h
#include <getopt.h>

Parses command-line options -a and -b

#include <getopt.h> #include <stdio.h> int main(int argc, char **argv) { int opt; while ((opt = getopt(argc, argv, "a:b")) != -1) { switch (opt) { case 'a': printf("Option a: %s\n", optarg); break; case 'b': printf("Option b\n"); break; } } return 0; }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
30 hits · last 30 days
node
26
Amazon
1
OpenAI (training)
1
Resources

No resource links recorded.

getopt — pip install getopt · libregistry