ex5_16.cpp

来自「Visual C++ 2005的源代码」· C++ 代码 · 共 19 行

CPP
19
字号
// Ex5_16.cpp : main project file.
// Receiving multiple command liner arguments.

#include "stdafx.h"

using namespace System;

int main(array<System::String ^> ^args)
{
  Console::WriteLine(L"There were {0} command line arguments.",
    args->Length);
  Console::WriteLine(L"Command line arguments received are:");
    int i = 1;
  for each(String^ str in args)
    Console::WriteLine(L"Argument {0}: {1}", i++, str);

    return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?