Visual-studio – Passing command line arguments in Visual Studio 2010

ccommand-line-argumentsvisual studiovisual studio 2010

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?

Best Answer

  • 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