I need to create a == operator overload with this biguint class that I created and have no clue how can someone help? I have been trying and used my compare function can someone help with that also? If someone can help me with this part I have done the +,+=,-,-+ operators but cant figure out how to access the numbers or if my compare is right for the == and with <?
std::string::compare() returns an int, not a bool. It returns a positive int if the string is lexicographically after the argument, a negative int if it's before, and 0 if it's equal. So you need to return lhs.compare(rhs) == 0.
This all assumes that a lexicographical comparison is appropriate, which I kind of doubt now that I think about it. It would need the leading zeroes to work properly. Maybe you should make a compare function that works on the numeric data directly. It seems that you are storing single digits in ints (or maybe shorts). I would've just used a string in the first place. And you seem to have a maximum CAPACITY for the numbers, too, which is not really necessary.
== should be easy and fast for most objects.
is the size the same? if not, not equal.
if size is the same, can you memcmp the data chunk and return that answer...