So basically, I was trying to read a file using C++ and Xcode, and since I haven't coded in a while, I was having some issues. I started to suspect that something was wrong, because the program wasn't reading anything from the file. So I broke it down to the following code, just to try and understand the basics of what was going wrong. I used the file 'trythis.txt', which consisted solely of the letter 'a'. I stored it in the same folder as main.cpp, so it's right there for the program to find it.
Anyways, I'm getting no output, and depending on whether I tweak something or not, I sometimes get an upside down question mark. Any ideas on what's going on here? Or did I just make a basic error in the program?