Passing parameters to main() : main « Development « Visual C++ .NET






Passing parameters to main()

 
#include "stdafx.h"
using namespace System;

int main ( int argc, char *argv[] )
{
    Console::WriteLine ( argc.ToString() );
    for (int i = 0; i < argc; i++)
    {
        Console::WriteLine ( gcnew String(argv[i]) );
    }
    return 0;
}

   
  








Related examples in the same category

1.Passing parameters to main() new method