Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
Oh and stop spamming the forum with duplicate posts. It will just be ignored.
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
ConvertToInteger can be reduced to this:
void HugeInteger::convertToInteger()
{
array1 = new int(strlen(a));
for (int i=0;i<strlen(a);i++)
array1[i] = a[i] - '0';
array2 = new int(strlen(b));
for (int i=0;i<strlen(b);i++)
array2[i] = b[i] - '0';
}
Ancient Dragon
Retired & Loving It
30,050 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439