title: Giving file location from parent of the parent folder in C++
body: <p>I'm a newbie to C++ and I know its a basic question but couldnt find a satisfactory answer from anywhere so I'll read the file location from parent folder but I dont know how.</p>
  
  <p>Executed file is in</p>
  
  <p><strong>C:\A\B\C\D\Test.exe</strong></p>
  
  <p>The file I need to open is in</p>
  
  <p><strong>C:\A\E\F\Open.exe</strong></p>
  
  <p>But I want to do this dynamically. So config of the text.exe should give a path to A then into E and F. Because this program can be located anywhere and I dont want to give a path starting from C:\</p>
  
  <p>Any help would be appriciated. I'm using QT too if it helps. Thanks</p>
  
  <p><strong><em>EDIT :</em></strong></p>
  
  <p>I am looking for something like </p>
  
  <pre><code>&lt;a href="../../other/file.pdf"&gt;file.pdf&lt;/a&gt;
  </code></pre>
  
  <p>in html</p>
  
  <p><strong><em>EDIT 2:</em></strong>
  This is my code but its not working</p>
  
  <pre><code>QSettings setting("config.ini",QSettings::IniFormat);
  QString prolocation = setting.value("ProDir","../../../E/F/pro.exe").toString();
  
  QProcess process;
  process.start(prolocation);
  </code></pre>
  
  <p>And config file is:</p>
  
  <p>(bla bla other settings)</p>
  
  <p>ProDir=../../../E/F/pro.exe</p>