Why doesn't this code work properly???I mean,why does it not show anything when I run it? : <p>Is there any problem in overloading methods?I really think it should work but it doesn't.<hr/></p>

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

class BIGINT
{
    vector&lt;int&gt; big_number;
public:
    BIGINT(){}
    BIGINT(int);
    BIGINT(string);
    BIGINT operator+(const BIGINT&amp;)const;
    BIGINT operator+(int)const;
    BIGINT&amp; operator+=(const BIGINT&amp;);
    BIGINT&amp; operator==(const BIGINT&amp;);
    vector&lt;int&gt; get_bn() { return big_number; }

    friend ostream&amp; operator&lt;&lt;(ostream&amp; out,const BIGINT&amp;);
};
</code></pre>

<p>//constructors</p>

<pre><code>BIGINT::BIGINT(int n)
{
    vector&lt;int&gt; temp;
    while (n &gt; 0)
    {
        int a;
        a = n % 10;
        n /= 10;
        temp.push_back(a);
    }
    for (int i = temp.size() - 1;i &gt; 0;i--)
    {
        big_number.push_back(temp[i]);
    }
}

BIGINT::BIGINT(string sn)
{
    vector&lt;char&gt; temp;
    for (int i = 0;i &lt; sn.size();i++)
    {
        temp.push_back(sn[i]);
    }
    for (int i = 0;i &lt; temp.size();i++)
    {
        big_number.push_back(temp[i]-48);
    }
}
</code></pre>

<p>//overloading operator+</p>

<pre><code>BIGINT BIGINT::operator+(const BIGINT&amp; bn) const
{
    BIGINT temp;
    int size;
    int k = 0;
    if (bn.big_number.size()&gt;big_number.size()) size = big_number.size();
    else size = bn.big_number.size();
    for (int i = size - 1;i &gt; 0;i--)
    {
        if(k)
        {
            if (big_number[i] + bn.big_number[i]&gt;9)
            {
                temp.big_number.push_back(big_number[i] + bn.big_number[i] - 10 + 1);
                k = 1;
            }
            else
            {
                temp.big_number.push_back(big_number[i] + bn.big_number[i] + 1);
                k = 0;
            }
        }
        else
        {
            if(big_number[i]+bn.big_number[i]&gt;9)
            {
                temp.big_number.push_back(big_number[i] + bn.big_number[i] - 10);
                k = 1;
            }
            else
            {
                temp.big_number.push_back(big_number[i] + bn.big_number[i]);
                k = 0;
            }
        }

    }
    return temp;
}

BIGINT BIGINT::operator+(int n)const
{
    BIGINT temp;
    int size;
    int k = 0;
    vector&lt;int&gt; temp_int;
    while (n &gt; 0)
    {
        int a;
        a = n % 10;
        n /= 10;
        temp_int.push_back(a);
    }
    if (temp_int.size()&gt;big_number.size()) size = big_number.size();
    else size = temp_int.size();
    for (int i = size - 1;i &gt; 0;i--)
    {
        if (k)
        {
            if (big_number[i] + temp_int[i]&gt;9)
            {
                temp.big_number.push_back(big_number[i] + temp_int[i] - 10 + 1);
                k = 1;
            }
            else
            {
                temp.big_number.push_back(big_number[i] + temp_int[i] + 1);
                k = 0;
            }
        }
        else
        {
            if (big_number[i] + temp_int[i]&gt;9)
            {
                temp.big_number.push_back(big_number[i] + temp_int[i] - 10);
                k = 1;
            }
            else
            {
                temp.big_number.push_back(big_number[i] + temp_int[i]);
                k = 0;
            }
        }
    }
    return temp;
}


BIGINT operator+(int n, BIGINT bn)
{
    BIGINT temp;
    int size;
    int k = 0;
    vector&lt;int&gt; temp_int;
    while (n &gt; 0)
    {
        int a;
        a = n % 10;
        n /= 10;
        temp_int.push_back(a);
    }
    if (temp_int.size()&gt;bn.get_bn().size()) size = bn.get_bn().size();
    else size = temp_int.size();
    for (int i = size - 1;i &gt; 0;i--)
    {
        if (k)
        {
            if (bn.get_bn()[i] + temp_int[i]&gt;9)
            {
                temp.get_bn().push_back(bn.get_bn()[i] + temp_int[i] - 10 + 1);
                k = 1;
            }
            else
            {
                temp.get_bn().push_back(bn.get_bn()[i] + temp_int[i] + 1);
                k = 0;
            }
        }
        else
        {
            if (bn.get_bn()[i] + temp_int[i]&gt;9)
            {
                temp.get_bn().push_back(bn.get_bn()[i] + temp_int[i] - 10);
                k = 1;
            }
            else
            {
                temp.get_bn().push_back(bn.get_bn()[i] + temp_int[i]);
                k = 0;
            }
        }

    }
    return temp;
}
</code></pre>

<p>//overloading operator+=</p>

<pre><code>BIGINT&amp; BIGINT::operator+=(const BIGINT&amp; bn) 
{
    int size;
    int k = 0;
    if (bn.big_number.size()&gt;big_number.size()) size = big_number.size();
    else size = bn.big_number.size();
    for (int i = size - 1;i &gt; 0;i--)
    {
        if (k)
        {
            if (big_number[i] + bn.big_number[i]&gt;9)
            {
                big_number[i] = big_number[i] + bn.big_number[i] - 10 + 1;
                k = 1;
            }
            else
            {
                big_number[i] = big_number[i] + bn.big_number[i] + 1;
                k = 0;
            }
        }
        else
        {
            if (big_number[i] + bn.big_number[i]&gt;9)
            {
                big_number[i] = big_number[i] + bn.big_number[i] - 10;
                k = 1;
            }
            else
            {
                big_number[i] = big_number[i] + bn.big_number[i];
                k = 0;
            }
        }

    }
    return *this;
}
</code></pre>

<p>//overloading operator==</p>

<pre><code>BIGINT&amp; BIGINT::operator==(const BIGINT&amp; bn)
{
    for (int i = 0;i &lt; big_number.size();i++)
    {
        big_number[i] == bn.big_number[i];
    }
    return *this;
}
</code></pre>

<p>//overloading operator&lt;&lt;</p>

<pre><code>ostream&amp; operator&lt;&lt;(ostream&amp; out, const BIGINT&amp; bn)
{
    for (int i = 0;i &lt; bn.big_number.size();i++)
    {
        out &lt;&lt; bn.big_number[i];
    }
    return out;
}
</code></pre>

<p>//main</p>

<pre><code>int main()
{
    BIGINT a(123);
    BIGINT b(2);
    BIGINT c;
    c = a + b;
    cout &lt;&lt; c &lt;&lt; endl;
    system("pause");
    return 0;
}
</code></pre>
