So I'm trying to achieve this myself, but I decided to ask on this forum to see if anyone knew about some obscure project on sourceforge or something that did exactly this:

I need to store very large numbers and perform arithmetic on them. I am storing the values in a string of characters. The reason I am not using a bigint library is not only do I need something a little more tailored to my needs (I'm reading a binary file into an array of chars since I cant read it into any other variable, ifstream::read() ) I can't for the life of me figure out a way to copy the value stored in the char array into a bigint and I don't think the developers of the bigint libraries intended for them to be used that way.

And now to get to the point: I need a way to perform arithmetic on a string of chars,and I am working on it, but it's not working very well at the moment. Does anyone know if somebody else already made functions or designed a bigint library specifically for this?

Thanks

>>I can't for the life of me figure out a way to copy the value stored in the char array into a bigint and I don't think the developers of the bigint libraries intended for them to be used that way.

The developer of bigint did indeed provide a function for input/output with standard streams (istream ostream) and you can easily use that to turn a char-array into a bigint and vice versa, using the std::stringstream class. See the BigIntegerUtils.hh file.

This article has been dead for over six months. Start a new discussion instead.