I am trying to do something similar to this tutorial http://www.cprogramming.com/tutorial/c/lesson14.html
Where I get the title of the file to be opened, and the number of lines of that file to be printed at a time. I am having trouble on what I would put in my command line arguments. For example, do I need to put the name of my program in the command line argument?
"Assignment8_2" "testFile.rtf" "20"
Or do I only need the last two: "testFile.txt" "20"
Also, does the order matter in XCode when adding them with the "+" sign. I know the order will matter when we try to get the output (argv[1], argv[2], etc)
Also, where do I put the "testFile.rtf" in my file structure? Do I need to add it to my project? Put it in the same folder as my Executable?
I think I am doing something wrong because I currently have "testFile.txt" "5" as my arguments to XCode and when trying to print out argc, printf("%d", argc), I get nothing. I also try to print out argv[0], argv[1], argv[2], and I get: Assignment8_2(null)TERM_PROGRAM=Apple_terminal