Function
string toString() const;
Get BigInteger value in string format.
None
A string with the BigInteger value.
Example
#include <iostream> #include <string> #include "HKUAL_BigInteger.h" using namespace std; using namespace HKUAL; int main() { BigInteger bigInt( "10000" ); string s1 = bigInt.toString(); cout << "s1 = " << s1 << endl; return( 0 ); }
Output
s1 = 10000
Time Complexity
O(n1), for n1 is number of digits of the big integer.