none
Command Line options RRS feed

  • Question

  • Hi,

    I am new to VC++. I want to port the C++ program i built and run using gcc compiler in cygwin. I built an empty console application project in VC++ and added my source file. It build successfully as well.

    My problem is that I need to pass arguments at the command line and I dont know how to do that using the VC++ compiler. Any ideas?

     

    Wednesday, May 10, 2006 8:17 PM

Answers

  • Your int main method should receive an array, which will contain the command line arguments.

     

    Wednesday, May 10, 2006 8:22 PM
    Moderator
  •  rahulpuri wrote:

    Hi,

    I am new to VC++. I want to port the C++ program i built and run using gcc compiler in cygwin. I built an empty console application project in VC++ and added my source file. It build successfully as well.

    My problem is that I need to pass arguments at the command line and I dont know how to do that using the VC++ compiler. Any ideas?

     

    The Project  Properties - Configuration Properties - Debugging options has a Command Arguments setting.

    Wednesday, May 10, 2006 8:23 PM
    Moderator

All replies

  • Your int main method should receive an array, which will contain the command line arguments.

     

    Wednesday, May 10, 2006 8:22 PM
    Moderator
  •  rahulpuri wrote:

    Hi,

    I am new to VC++. I want to port the C++ program i built and run using gcc compiler in cygwin. I built an empty console application project in VC++ and added my source file. It build successfully as well.

    My problem is that I need to pass arguments at the command line and I dont know how to do that using the VC++ compiler. Any ideas?

     

    The Project  Properties - Configuration Properties - Debugging options has a Command Arguments setting.

    Wednesday, May 10, 2006 8:23 PM
    Moderator
  •  Nishant Sivakumar wrote:
     rahulpuri wrote:

    Hi,

    I am new to VC++. I want to port the C++ program i built and run using gcc compiler in cygwin. I built an empty console application project in VC++ and added my source file. It build successfully as well.

    My problem is that I need to pass arguments at the command line and I dont know how to do that using the VC++ compiler. Any ideas?

     

    The Project  Properties - Configuration Properties - Debugging options has a Command Arguments setting.

    thanks a million! got it running.

    Wednesday, May 10, 2006 8:44 PM