title: Opening a file in the current directory
body: <p>I'm trying to load files, and previously I was using hardcoded file locations, (like "c:\location\file.txt") but now that a few friends are also using the file, I'd like to allow them to put the executable wherever they want.</p>
  
  <p>my current code looks like:</p>
  
  <pre><code>ifstream myfile;
  myfile.open("c:\\client\\settings.cfg");
  </code></pre>
  
  <p>I'm trying to change it so that the user puts their executable into whatever folder they want, and then they create a folder and put their settings file into it and the exe will load that with their settings.</p>
  
  <pre><code>ifstream myfile;
  myfile.open("\\settings\\settings.cfg");
  </code></pre>
  
  <p>I have some basic error handling in place, and now the program always errors out saying that it can't find the file.</p>
  
  <p>The file structure looks like this:</p>
  
  <pre><code>[ART]
    asset.png
  [SETTINGS]
    settings.cfg
  client.exe
  </code></pre>
  
  <p>This seems like a really simple thing to do, but I can't find any way to do it. Every example and tutorial about reading and writing to files deals only with files in the executable's directory, or hardcoded into c:\folder... </p>
  
  <p>Could anyone point me to how I do this?</p>