My fstream always returns true, even with bad file name?
<p>This is my first question, and i seriously cannot figure this out.  After debugging I realize that no matter what gets put into outFileName and in turn outFile, it always returns true and will not display the error message.  Sorry if I have left anything out this is c++ I am using visual studio 2010 let me know if I need to add anything to the question.</p>

<pre><code>        inFile.open(fileName.c_str(), ios::in);
        outFile.open(outFileName.c_str(), ios::out);
        if (inFile.good() == false &amp;&amp; outFile.good() == false)
        {
            cerr &lt;&lt; strerror(errno) &lt;&lt; endl;
            cerr &lt;&lt; "Problem with the input and output file" &lt;&lt; endl;
            continue;
        }

        else if (inFile.good() == true &amp;&amp;
                 outFile.good() == false)
        {
            cerr &lt;&lt; strerror(errno) &lt;&lt; endl;
            cerr &lt;&lt; "Problem with the output file";
            continue;
        }
        else if (outFile.good() == true &amp;&amp;
                inFile.good() == false)
        {
            cerr &lt;&lt; strerror(errno) &lt;&lt; endl;
            cerr &lt;&lt; "Problem with the input file" &lt;&lt; endl;
        }
</code></pre>
