im making a class called BigInt it will store integers in an integer array, 1 digit per array location(just ask if you need me to clearfy any more).....i have to make an addBigInt operation, subtract,setBigInt that will store an integer value into an existing BigInt, e.g. x.setBigInt(-397) replaces the value stored in x.
and a multiplication operation now i just need a little help setting up the addBigInt???
i have a const int SIZE = 10 for now
class is BigInt
public:
i have the constructor BigInt (int = 0);
void addBigInt (const &);
void printBigInt();
void setBigInt();
private:
int x ;
BigInt::BigInt(int y) // stores integer in integer array one digit at a time
{
for(int i = 0; i < SIZE; i++)
{
x = y % 10;
y /= 10;
}
}
this is mainly what i got so far i just need help with the adding method then maybe i can use that example to carry me through the other methods..
void addBigInt(const &)
{
kinda lost what i should do here
this is my first thread want to say love this site and it has helped me in the past thank you guys and gals *cheers*