Finished operator overloading
This commit is contained in:
parent
97125eaf07
commit
971f13a59b
3 changed files with 91 additions and 11 deletions
|
@ -1,6 +1,7 @@
|
|||
#include "gm3p.hpp"
|
||||
|
||||
//#include <iostream>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
using namespace gm3p;
|
||||
|
||||
|
@ -9,9 +10,16 @@ int main(int argc, char** argv)
|
|||
gInt a("12234234234095780349859034869034635235", 10);
|
||||
gInt b("123534622305820985092875207398734234753", 10);
|
||||
|
||||
a *= b;
|
||||
gInt c = a * b;
|
||||
|
||||
std::cout << a << " * " << b << " = " << c << std::endl;
|
||||
std::cout << std::dec << a << " * " << b << " = " << c << std::endl;
|
||||
std::cout << std::hex << a << " * " << b << " = " << c << std::endl;
|
||||
std::cout << std::oct << a << " * " << b << " = " << c << std::endl << std::endl << std::dec;
|
||||
|
||||
int d = c;
|
||||
std::cout << d << std::endl;
|
||||
std::cout << c.ToString(NULL, 2) << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue