0

I have placed a .gr file in the same directory as my main.cpp and in the main project file for the Xcode project (There is only one .cpp file for this small program). The code I am using to parse the data looks something like this:

    ifstream inFile("rome99.gr");
    if(!inFile.good()) {
        cerr << "The file wasn't found. For Visual Studio users, make sure it's in the same directory as your solution's .vcxproj file." << endl;
        pressAnyKeyToContinue();
        exit(-1);
    }

Xcode isn't seeing it. I can get it to work in VS2012 by simply doing what it says but I want it to work in Xcode. There are no debugger errors. Should I be placing the file elsewhere or is it another problem? Thanks.

btalbot
  • 167
  • 9
  • 1
    You may find [**this informative**](http://stackoverflow.com/questions/14476655/code-runs-perfect-in-g-but-not-in-xcode-cannot-find-file/14478210#14478210). – WhozCraig Aug 02 '14 at 04:12
  • 1
    Your expression right now must be like "grrrrr". – Mark Garcia Aug 02 '14 at 04:12
  • Problem answered [here][1]. Thanks @WhozCraig [1]: http://stackoverflow.com/questions/14476655/code-runs-perfect-in-g-but-not-in-xcode-cannot-find-file/14478210#14478210 – btalbot Aug 02 '14 at 05:49

0 Answers0