The sample code shows how to use the getopt() function to parse the command-line options in a C or C++ program. Options may have no argument at all, or have one or more arguments.

Project Activity

See All Activity >

License

GNU Library or Lesser General Public License version 2.0 (LGPLv2)

Follow Getopt Sample

Getopt Sample Web Site

Other Useful Business Software
$300 Free Credits to Build on Google Cloud Icon
$300 Free Credits to Build on Google Cloud

New customers can spin up VMs, build with AI, and query data at no cost.

Put your $300 in credit toward real workloads, then keep building with free monthly usage for 20+ products. No commitment and no charge until you upgrade.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Getopt Sample!

Additional Project Details

Operating Systems

BSD, Linux

Intended Audience

Developers

User Interface

Command-line

Programming Language

C, C++

Related Categories

C++ Software Development Software, C Software Development Software

Registered

2007-07-23