Commit c8b22d113db95260a583fa7884a7da59c4a7c3a9
1 parent
2bf1060d
print usage
Showing
3 changed files
with
12 additions
and
2 deletions
src/cxxopts.cpp
src/cxxopts.hpp
| ... | ... | @@ -329,6 +329,12 @@ namespace cxxopts |
| 329 | 329 | { |
| 330 | 330 | public: |
| 331 | 331 | |
| 332 | + Options(std::string program, std::string help_string = "") | |
| 333 | + : m_program(std::move(program)) | |
| 334 | + , m_help_string(std::move(help_string)) | |
| 335 | + { | |
| 336 | + } | |
| 337 | + | |
| 332 | 338 | void |
| 333 | 339 | parse(int& argc, char**& argv); |
| 334 | 340 | |
| ... | ... | @@ -410,6 +416,9 @@ namespace cxxopts |
| 410 | 416 | const std::string& name |
| 411 | 417 | ); |
| 412 | 418 | |
| 419 | + std::string m_program; | |
| 420 | + std::string m_help_string; | |
| 421 | + | |
| 413 | 422 | std::map<std::string, std::shared_ptr<OptionDetails>> m_options; |
| 414 | 423 | std::string m_positional; |
| 415 | 424 | ... | ... |