How to check if a file exists with stat in visual studio c++ 2010?
<p>This is the code I have for checking if a file exists in my visual studio 2010 c++ project:</p>

<pre><code>bool GLSLProgram::fileExists( const string &amp; fileName )
{
    struct stat info;
    int ret = -1;

    ret = stat(fileName.c_str(), &amp;info);
    return 0 == ret;
}
</code></pre>

<p>I am not sure why it returns false for "shaders/color.vert" when that file really exists, and shaders is a folder in my project main folder.</p>

<p>Can you see something wrong?</p>

<p>THanks</p>
