[英]application with argument in the console
I have an application which takes several arguments entered in the console : here is an example : 我有一个需要在控制台中输入几个参数的应用程序:这是一个示例:
MyApp.exe -D 23/01/2014 -B True
according to these arguments the application will behave differently how can I add that in my code 根据这些参数,应用程序的行为将有所不同,如何在代码中添加它
这是一个有关您如何获取参数的链接 。
只是想添加到粗体答案,如果您使用的是VS,则可以添加这些arg,以便每次调试时都可以获取它们,右键单击项目->属性->调试->,在开始选项中有一个称为command的文本区域。行参数,希望这会有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.