问题:
What is the best way of parsing command-line arguments in C++ if the program is specified to be run like this:如果程序被指定为这样运行,那么在 C++ 中解析命令行参数的最佳方法是什么:
prog [-abc] [input [output]]
Is there some way of doing this built into the standard library, or do I need to write my own code?标准库中是否有某种方法可以做到这一点,还是我需要编写自己的代码?
Related:有关的:
解决方案:
参考一: https://en.stackoom.com/question/3dCO参考二: https://stackoom.com/question/3dCO