cerr is undefined
<p>New to C++ and having some problems, I'm getting these errors (marked in the code):</p>

<ul>
<li>identifier "cerr" is undefined</li>
<li>no operator "&lt;&lt;" matches these operands</li>
</ul>

<p>Why?</p>

<pre><code>#include "basic.h"
#include &lt;fstream&gt;

using namespace std;

int main()
{

    ofstream output("output.txt",ios::out);
    if (output == NULL)
    {
        cerr &lt;&lt; "File cannot be opened" &lt;&lt; endl;   // first error here
        return 1;
    }

    output &lt;&lt; "Opening of basic account with a 100 Pound deposit: "
        &lt;&lt; endl;
    Basic myBasic (100);
    output &lt;&lt; myBasic &lt;&lt; endl;   // second error here
}
</code></pre>
