命令行参数 [英] command line argument

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

问题描述

如何允许用户通过选择命令行参数输入输入或在C ++中提示输入?

Hi, how do you allow the user to enter the input through his choice of command line arguments or being prompted for input in C++?

推荐答案

参见,实例:如何解析命令行参数 [ ^ ]和基本输入/输出 [ ^ ] at at c ++ app中的 cplusplus.com
See, for instance: "How to parse command line parameters"[^] and "Basic Input/Output"[^] at cplusplus.com.


你有一个main函数,它有一个argc参数,命令行来自in。解析它是很常见的。
in a c++ app you have the main-function which has the argc parameter in which the the command line comes in. it is common use to parse it.


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

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