Function
friend istream& operator >> ( istream& is, BigInteger& val );
Set the value getting from the input stream to the BigInteger val.
Parameters
An istream object and a BigInteger object.
Return value
The istream object.
Example
#include <iostream>
#include <string>
#include "HKUAL_BigInteger.h"
using namespace std;
using namespace HKUAL;
int main() {
BigInteger bigInt;
cout << "Input new BigInteger value: ";
cin >> bigInt; // assume input "-10000"
cout << "bigInt = " << bigInt << endl;
return( 0 );
} |
Output
Input new BigInteger value: -10000
bigInt = -10000 |
Time Complexity
, n is number of digits of the big integer.
|