I am having a problem trying to multiply arrays. Everything works fine until the second(bottom) number is more then 6 digits. Any help would be great.
Here is what I have:
Code:
CHugeInt CHugeInt::operator*(const CHugeInt &n)
{
CHugeInt cTemp, cWork;
int nCarry = 0;
for (int y = 29; y >= 0; y--)
{
for (int i = 0; i <= 29; i++)
{
cWork.m_nInt[i] = 0;
}
for (int x = 29, a = y; x >= 0; x--, a--)
{
cWork.m_nInt[a] = ((m_nInt[x] * n.m_nInt[y]) % 10) + nCarry;
nCarry = (m_nInt[x] * n.m_nInt[y]) / 10;
}
cTemp = cTemp + cWork;
}
return (cTemp);
}