int main(int argc, char ** argv) {
string num1; string num2;
cin >> num1 >> num2;
cout << num1 << ", " << num2;
}
34 54
34, 54
Thanks again for your reply. I'm not the most experienced with Xcode, so I really appreciate your help.
I have placed "test.txt" into both the project directory and the build/debug directory. I also have "< test.txt" in my argument list; however, it does still not work for some reason. If I compile and run it myself within terminal, it works fine, but in Xcode it just waits for me to type in a value... any other ideas?
Downloaded your attachment, followed the steps in your previous post, but still no luck :-( I'm running out of ideas as to how to get this working (likely you are as well) so I think I will just have to test on a Linux command line. Again, really appreciate your help!
The project requires us to use stdin for all input, so ifstream is not an option. I ended up just separately compiling in Terminal... which leads me to another question: Is there an easy way to get to a directory within Terminal? Looking for a way around typing "cd dir/dir1/dir2/dir3/..."
cd ~/Library/Preferences
ls -la *Xcode*
cd ~
echo Done.
cd ~/Library/Preferences; ls -la *Xcode*
Downloaded your attachment, followed the steps in your previous post, but still no luck :-( I'm running out of ideas as to how to get this working (likely you are as well) so I think I will just have to test on a Linux command line. Again, really appreciate your help!
Here it is. Thanks for your persistence! BTW, please don't hate on my lack of coding expertise![]()
That does not fix the error. I put a "test.txt" in both the project and build/debug directory, neither or which work.
That's odd!
What versions of Mac OS and Xcode are you working with?
No luck with that either. This is quite frustrating!