0

I know that in VS2012, the fout thing is saved in the same folder as the source.cpp file, but I cannot find the file in mac using Xcode. Let me be clear:

    int main()
    {
    ofstream fout;
    fout.open("MyFile.txt");   
    fout << "Where am I going?";
    fout.close();
    return 0;
    }

so if "MyFile.txt" does not exist, it is created. then I don't know where it goes...

1 Answers1

0

In your home (ex. /Users/roshinichi) follow this path

./Library/Developer/Xcode/DerivedData/

here are located your application "derived data". Your file is there. In general, on mac, you can run from a shell

find . -name MyFile.txt

I hope this can help you.

Salvatore Avanzo
  • 2,656
  • 1
  • 21
  • 30