I am solving my C assignment in Xcode and in that program i have to give command line arguments when running the program and for this i have to user terminal like this:
./a.out myfirstCommand mySecondCommand
I was wondering if it possible to give these kind of commands within xcode instead of going to terminal. Thanks
If you want to pass command line arguments then you will have to define the main() function with two arguments. The first argument defines the number of command line arguments and the second argument is the list of command line arguments.
As of Xcode 4.x I've had to go to the Product menu, select "Edit Scheme", then select the arguments tab and add the arguments there.
Keyboard shortcut is commandshift<
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With