Heh, I would like to be able to do that but the only way to work for school and verify my programs is to send them at school's online evaluator but for that I have to use the fstream library, on MinGW(Windows) I was just
#include <fstream.h>
ifstream fin("NAME.in");
ofstream fout("NAME.out");
And then add 2 header files NAME.in and NAME.out, I tried the same on Xcode but it's not working 🙁.