如何在Visual c++ 6.0中使用命令行参数运行控制台应用程序?

时间:2021-02-13 16:36:41

I've got a console application that compiles and executes fine with Visual C++ 6.0, except that it will then only get as far as telling me about missing command line parameters. There doesn't seem to be anywhere obvious to enter these. How do I run or debug it with command line parameters?

我有一个控制台应用程序,它可以用Visual c++ 6.0很好地编译和执行,但是它只会告诉我关于缺少命令行参数的信息。似乎没有任何明显的地方可以进入这些。如何使用命令行参数运行或调试它?

3 个解决方案

#1


58  

I assume you're talking about setting the command line parameters for running in the IDE.

我假设您正在讨论为在IDE中运行设置命令行参数。

Open the Project/Settings property page and go to the Debug tab.

打开项目/设置属性页,进入Debug选项卡。

There's a "Program arguments" field you can put them into.

有一个“程序参数”字段,您可以将它们放入其中。

#2


8  

If I remember correctly, under Project/Settings/Debug tab there is a place to enter the command line parameters. It's the "Program arguments" field.

如果我没记错的话,在Project/Settings/Debug选项卡下有一个地方可以输入命令行参数。这是“程序参数”字段。

#3


4  

In VS2010: Right click the project. Select Properties. Select Debug tab. Start Options -> Command line arguments: Enter the arguments here.

在VS2010中:右键单击项目。选择Properties。选择Debug选项卡。启动选项->命令行参数:在这里输入参数。

#1


58  

I assume you're talking about setting the command line parameters for running in the IDE.

我假设您正在讨论为在IDE中运行设置命令行参数。

Open the Project/Settings property page and go to the Debug tab.

打开项目/设置属性页,进入Debug选项卡。

There's a "Program arguments" field you can put them into.

有一个“程序参数”字段,您可以将它们放入其中。

#2


8  

If I remember correctly, under Project/Settings/Debug tab there is a place to enter the command line parameters. It's the "Program arguments" field.

如果我没记错的话,在Project/Settings/Debug选项卡下有一个地方可以输入命令行参数。这是“程序参数”字段。

#3


4  

In VS2010: Right click the project. Select Properties. Select Debug tab. Start Options -> Command line arguments: Enter the arguments here.

在VS2010中:右键单击项目。选择Properties。选择Debug选项卡。启动选项->命令行参数:在这里输入参数。