[bigint] BigNum library

Matt McCutchen <matt at mattmccutchen.net>
Thu Aug 20 23:14:26 PDT 2009


On Mon, 2009-08-17 at 18:08 -0400, Dhaivat Pandya wrote:
> I've been wanting to write a bignum library as a programming exercise.
> I've looked through some libraries and all of them (except yours) use
> functions to add up all the bignums. Your library, on the other hand,
> uses the built in operators for C. How is that possible?

It's a C++ feature called operator overloading that lets one define
custom versions of the built-in operators to act on user-defined data
types.  For more details, see:

http://en.wikibooks.org/wiki/C%2B%2B_Programming/Operators/Operator_Overloading

-- 
Matt




More information about the bigint mailing list