title: problem opening file c++
body: <p>Must be a simple answer but I am at a loss, here is the code that is returning an error. I have tried with and without the starting slash.</p>
  
  <p>I won't know the full path, I want it to be relative from the exe, and that is the relative path. I tried escaping the slashes.</p>
  
  <p>My problem is that i get "error opening file" when the file is there. why is it failing?</p>
  
  <pre><code>  ifstream myFile("/LOGS/ex090716.txt");
    if (myFile.fail()) {cout &lt;&lt; "Error opening file";}
    else
    {
     cout &lt;&lt; "File opened... \n";
     //string line;
     //while( getline(myFile, line) ) {
     // cmatch results;
     // regex rx("(p|q)(=)([^ %]*)");
     // regex_search(line.c_str(), results, rx);
     // string referringWords = results[3];
     //}
     myFile.close();
    }
  </code></pre>
  
  <p>thank you</p>