Reference to object ambigous?
<p>This is my program  and it fails because of this error : reference to 'exception' is ambiguous. </p>

<p>Why is that?</p>

<p>Is it because my class name is "exception" and C++ already has other function using the name "exeption"? For instance, in C++ we cannot use "int" as a variable. Does this logic applies here aswell?
Thank you.</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;math.h&gt;

using namespace std;

class exception{

public:
    exception(double x,double y ,double z)
    {
    cout&lt;&lt;"Please input a";

    cin&gt;&gt;x;
    cout&lt;&lt;"Please input b";

    cin&gt;&gt;y;
    cout&lt;&lt;"Please input c";

    cin&gt;&gt;z;

    a=x;
    b=y;
    c=z;
    /*
    try{
        int sonsAge = 30;
        int momsAge = 34;
        if ( sonsAge &gt; momsAge){
            throw 99;
        }
    }
    catch(int x)
    {
        cout&lt;&lt;”son cannot be older than mom, Error number :”&lt;&lt;x;
    }
    */
    try {
        if (a==0) {
            throw 0;
        }
        if ((b*b)-(4*a*c)&lt;0) {
            throw 1;
        }
        cout&lt;&lt;"x1 is"&lt;&lt;(-b+sqrt(b*b-4*a*c))/(2*a)&lt;&lt;endl
            &lt;&lt;"x2 is"&lt;&lt;(-b-sqrt(b*b-4*a*c))/(2*a);
    } catch (int x) {
        if (x==0) {
            cout&lt;&lt;"Error ! cannot divide by 0";
        }
        if (x==1) {
            cout&lt;&lt;"The square root cannot be a negative number";
        }
    }
    };

private:
    double a,b,c;
};

int main()
{
    exception ob1(3.2,12.3,412);
    return 0;
}
</code></pre>
