从最初运行的程序到主函数的c ++输入值

时间:2015-04-09 00:35:10

标签: c++ linux input parameters output

您好我正在尝试制作一个执行以下操作的程序

我将使用以下内容在Linux中启动该程序:

我会在linux中编译程序调用它test1

我希望运行:test 10 10

所以最终结果来自我的php程序

#include <iostream>
#include <cstdlib> 
using namespace std;

int main(int v1, int v2)
{
      int o = 0;
      o = v1 * 10;
      cout << v1 << '*' << v2 << '=' << o;
      return 0;
}

0 个答案:

没有答案