Assigning Private Variable within a constructor
<p>I've read through stack overflow threads multiple times in the past, and they're often quite helpful. However, I've run into a problem that simply doesn't make sense to me, and I'm trying to figure out what I missed. Here's the sections of the code that I'm having trouble with:</p>

<pre><code>class BigInts
{

public:


    static const std::size_t MAXLEN = 100;


    BigInts(signed int i); //constructor
    BigInts(std::string &amp;); //other constructor

    std::size_t size() const;

    digit_type operator[](std::size_t ) const;


private:
    digit_type _data[MAXLEN];
    bool       _negative;
    int _significant;
};

//nonmember functions

std::ostream &amp; operator &lt;&lt; (std::ostream &amp;, const BigInts &amp;);


BigInts::BigInts(signed int i)
{
    _negative = (i &lt; 0);
    if (i &lt; 0)
    {
        i = -1*i;
    }

    std::fill(_data, _data+MAXLEN, 0);

    if (i != 0)
    {
        int d(0);
        int c(0);
        do
        {
            _data[d++] = ( i % 10);
            i = i / 10;
            c++; //digit counter
        }while(i &gt; 0);

        //_significant = c; //The problem line

        assert(c &lt;= MAXLEN); //checks if int got too big
    }
}

std::size_t BigInts::size() const
{
    std::size_t pos(MAXLEN-1);
    while (pos &gt; 0 &amp;&amp; _data[pos] == 0)
    --pos;
    return pos+1;
}

std::ostream &amp; operator &lt;&lt; (std::ostream &amp; os, const BigInts &amp; b)
{

    for (int i = (b.size() - 1);  i &gt;= 0; --i)
        os &lt;&lt; b[i];
    return os;
}

int main()
{
signed int a, b;


std::cout &lt;&lt; "enter first number" &lt;&lt; std::endl;
std::cin &gt;&gt; a;

std::cout &lt;&lt; "enter second number" &lt;&lt; std::endl;
std::cin &gt;&gt; b;

BigInts d(a), e(b), f(b);

std::cout &lt;&lt; d &lt;&lt; " " &lt;&lt; e &lt;&lt; " " &lt;&lt; f;
</code></pre>

<p>Major edit, switched from an attempted dummy version of the code to the actual code I'm using, complete with the original variable names. I tried to remove anything that isn't relevant to the code I'm currently working with, but if you see a strange name or call in there, let me know and I can post the associated portion.</p>

<p>The code had been working fine prior to the introduction of _significant, which is a variable I had added to add some more functionality to the class as a whole. However, when I attempted to drive the basic parts of it using the main function you see displayed, it encountered large errors. For example, I inputted 200 and 100 for a and b respectively, it outputted 201, 1, and 3 for d, e, and f. As it currently stands, the ONLY place _significant appears is when I'm attempting to assign the value of c to it.</p>
