Skip to content

Glossary: C++ Basics

argc and argv

Also written: argc, argv

The two parameters that let `main` receive command-line arguments. `argc` counts the words typed, including the program's name, and `argv` holds them. In `./orders menu.txt`, `argv[1]` is `menu.txt`.

Where the book teaches it

Related terms

Command-line argumentsPointer