I've created a new project as a command line tool. I've also stored it in a folder in my dropbox so that I can access it elsewhere if I need. I don't think this is related to my problem, but more information can't hurt.
My program will eventually read in a string, and count the frequency of letters. I want it to read in a text file just like you would do it in the command line.
Ex:
./a.out < file.txt
How do I get Xcode to use this file as the input for my program like the above? I'm using the latest version of Xcode (5.1) and Mac OSX (10.9.2).
Where my source is stored: /Users/mattholladay/Dropbox/CSCE 1030/Homework 4/Homework 4
I also have file.txt stored in this directory and I have manually made it my working directory. I'm not sure if this is right though. Should I place it somewhere else? Is it necessary to change the working directory?
I've searched google and macrumors specifically for help with this problem, but nothing has worked so far. I am a beginner programmer and barely know my way around Xcode (though I'm learning).
Thanks in advance!
My program will eventually read in a string, and count the frequency of letters. I want it to read in a text file just like you would do it in the command line.
Ex:
./a.out < file.txt
How do I get Xcode to use this file as the input for my program like the above? I'm using the latest version of Xcode (5.1) and Mac OSX (10.9.2).
Where my source is stored: /Users/mattholladay/Dropbox/CSCE 1030/Homework 4/Homework 4
I also have file.txt stored in this directory and I have manually made it my working directory. I'm not sure if this is right though. Should I place it somewhere else? Is it necessary to change the working directory?
I've searched google and macrumors specifically for help with this problem, but nothing has worked so far. I am a beginner programmer and barely know my way around Xcode (though I'm learning).
Thanks in advance!