Sunday, March 27, 2011

C++ string to boolean array

I have a ~100 digit string which represents a number in base 10 that I want to convert to either a string representing the number in base 2, or a bool array which represents the number's digits in binary. I can do it easily in Java using BigInteger, but I'm not sure if there is an equivalent in C++.

Function would be something like:

string toBinaryString(string numInDecimal);

Thanks for the help.

From stackoverflow

0 comments:

Post a Comment