Fahad Fahad - 5 months ago 32
C Question

Passing command line arguments in Visual Studio 2010?

I am currently working on a C project and could not figure out how to pass command line arguments to my main function in Visual Studio 2010 Express Edition. I want to debug - how do these command line arguments work?

  • Right click your project in Solution Explorer and select Properties from the menu
  • Go to Configuration Properties -> Debugging
  • Set the Command Arguments in the property list.

Adding Command Line Arguments