gpt4 book ai didi

c++ - TCLAP : how to check whether an optional command line argument has been specified?

转载 作者:行者123 更新时间:2023-11-28 05:45:15 27 4
gpt4 key购买 nike

如何 checkin Templatized C++ Command Line Parser Library library 是否在命令行上指定了可选的 ValueArg?我查看了源代码,但没有找到任何为此目的...

最佳答案

您可以使用 bool TCLAP::Arg::isSet () const方法来做到这一点。从文档中,它:

Indicates whether the argument has already been set.

Only true if the arg has been matched on the command line.

关于c++ - TCLAP : how to check whether an optional command line argument has been specified?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36357107/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com