Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可选参数的option应该怎么写? #45

Open
AngusLkc opened this issue Jun 9, 2021 · 1 comment
Open

可选参数的option应该怎么写? #45

AngusLkc opened this issue Jun 9, 2021 · 1 comment

Comments

@AngusLkc
Copy link

AngusLkc commented Jun 9, 2021

比如:OPT_BOOLEAN('t', "test", &test, "test only", NULL, 0, 0),
我想命令行参数中-t带与不带参数均可正常解析能实现吗

@cofyc
Copy link
Owner

cofyc commented Jun 10, 2021

boolean 不需要参数,只是 flag 存在与否来表示 true/false
但目前实现好像带参数也行..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants