Passing command line arguments in Visual Studio 2010?

Fahad picture Fahad · Sep 13, 2010 · Viewed 180.7k times · Source

I am working on a C project and can 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?

Answer

Andrew Cooper picture Andrew Cooper · Sep 13, 2010
  • 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