title: fstream requires an absolute directory in VS Code to load a file. How would I use a relative directory?
body: <p>I am creating files (currently in .txt form) that I would like to open using filestream. Using <code>file.open()</code> only works when I use the absolute directory (something like <code>D:/repos/project/resources/textfile.txt</code>) instead of <code>project/resources/textfile.txt</code>. This is problematic because not everyone on my team has the same file structure that I have.</p>
  <p>I'm guessing it is a compiler thing, but I'm not sure. Here is what my build task looks like (I'm just using the default cpp vscode build task)</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;tasks&quot;: [
          {
              &quot;type&quot;: &quot;cppbuild&quot;,
              &quot;label&quot;: &quot;C/C++: g++.exe build active file&quot;,
              &quot;command&quot;: &quot;C:\\msys64\\mingw64\\bin\\g++.exe&quot;,
              &quot;args&quot;: [
                  &quot;-fdiagnostics-color=always&quot;,
                  &quot;-g&quot;,
                  &quot;${file}&quot;,
                  &quot;-o&quot;,
                  &quot;${fileDirname}\\${fileBasenameNoExtension}.exe&quot;
              ],
              &quot;options&quot;: {
                  &quot;cwd&quot;: &quot;C:\\msys64\\mingw64\\bin&quot;
              },
              &quot;problemMatcher&quot;: [
                  &quot;$gcc&quot;
              ],
              &quot;group&quot;: {
                  &quot;kind&quot;:&quot;build&quot;,
                  &quot;isDefault&quot;: true
              },
              &quot;detail&quot;: &quot;compiler: C:\\msys64\\mingw64\\bin\\g++.exe&quot;
          }
      ],
      &quot;version&quot;: &quot;2.0.0&quot;
  }
  </code></pre>