ifstream not working
<p>I'm trying to open a file using ifstream, but no matter what solutions I find that I've tried, nothing seems to work; my program always outputs "unable to open". Below is my code in its entirety. Any help at all is appreciated!</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;string&gt;
using namespace std;

int main(int argc, char ** argv)
{
    string junk;
    ifstream fin;
    fin.open("somefile.txt");

    if(fin.is_open())
    {
        fin &gt;&gt; junk;
        cout &lt;&lt; junk;
    }
    else
    {
        cout &lt;&lt; "unable to open" &lt;&lt; endl;
    }

    fin.close();
    return 0;
}
</code></pre>

<p>Also, the contents of somefile.txt, which is in the same directory as the created executable is the following:</p>

<pre><code>SOME
FILE
</code></pre>
