title: What is the path to the Mac OSX application Contents folder
body: <p>I am writing an Objective-c++ application and I am trying to reach the applications <code>Contents</code> folder.</p>
  
  <p>Let's pretend my apps name is MyApp.app. If I run my application from Xcode then I can reach the <code>Contents</code> folder like this:</p>
  
  <pre><code>std::fstream file;
  file.open("MyApp.app/Contents/some_text_file.txt");
  if(file.is_open()) {
  ...
  }
  else {
  ...
  }
  </code></pre>
  
  <p>But If I run my built application without Xcode, then <code>file.is_open()</code> fails.</p>