Command line arguments
Evening,
I'm trying to pass some arguments to a program I'm running in XCode - it's actually a GLUT application. I'd like to pass the number of objects I want displayed to the application.
I tried to add the arguments by editing the settings for my project, but when I tested it out by passing 100 as an argument, the value contained in argc turned to be 3.
Thanks,
Anthony
I'm trying to pass some arguments to a program I'm running in XCode - it's actually a GLUT application. I'd like to pass the number of objects I want displayed to the application.
I tried to add the arguments by editing the settings for my project, but when I tested it out by passing 100 as an argument, the value contained in argc turned to be 3.
Thanks,
Anthony
argc is the number of arguments passed. argv is the argument values.
You may find the atoi function helpful here
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Read a text file line by line? | jdunehew | 6 | 9,071 |
Dec 29, 2011 11:54 AM Last Post: Blacktiger |
|
| Applets from the Command Line | merrill541 | 0 | 1,916 |
Nov 23, 2008 12:44 PM Last Post: merrill541 |
|
| "Command /.../jam failed with exit code 1"- huh? | Joseph Duchesne | 2 | 5,346 |
Mar 29, 2006 09:32 AM Last Post: socksy |
|
| Configure command | Blorx2 | 1 | 2,305 |
Mar 25, 2005 02:07 PM Last Post: NCarter |
|

