如何解析C ++中的命令行参数? [英] How to Parse Command Line Arguments in C++?

查看:144
本文介绍了如何解析C ++中的命令行参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
  <一href=\"http://stackoverflow.com/questions/253556/what-parameter-parser-libraries-are-there-for-c\">What参数解析器库在那里为C ++?

什么是如果指定程序在解析C命令行参数++的最佳方式
是这样运行的:

What is the best way of parsing command-line arguments in C++ if the program is specified to be run like this:

prog [-abc] [input [output]]

是否有STL库做到这一点?

Is there a library in STL to do this?

相关阅读:

  • Parsing command line arguments in a unicode C++ application

推荐答案

Boost.Program_options 应该做的伎俩

这篇关于如何解析C ++中的命令行参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆