tags:

views:

85

answers:

1

Hi All,

How to pass arguments to the main function in XCode ?

Thanks

+4  A: 

In the Groups & Files section of the project, find "Executables". Find the executable that you're generating (i.e. "MyTestProject"), right click and select "Get Info". In the dialog that appears, there's an "Arguments" tab in which you can configure command line arguments and environment variables for launch. These command line arguments will be passed to "main".

Adam Wright