Added more operations and install statements
This commit is contained in:
parent
95282f7d1a
commit
97125eaf07
6 changed files with 58 additions and 4 deletions
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "gmp.h"
|
||||
|
||||
namespace gm3p
|
||||
|
@ -7,19 +9,28 @@ namespace gm3p
|
|||
class gInt
|
||||
{
|
||||
public:
|
||||
// CONSTRUCTORS
|
||||
gInt();
|
||||
gInt(mpz_t init);
|
||||
gInt(unsigned long int init);
|
||||
gInt(long int init);
|
||||
gInt(const char* init, int base);
|
||||
~gInt();
|
||||
|
||||
// ASSIGNMENT OPERATORS
|
||||
gInt& operator=(const gInt& other);
|
||||
|
||||
// ARITHMETIC OPERATORS
|
||||
friend gInt operator+(const gInt& left, const gInt& right);
|
||||
friend gInt operator-(const gInt& left, const gInt& right);
|
||||
friend gInt operator*(const gInt& left, const gInt& right);
|
||||
friend gInt operator/(const gInt& left, const gInt& right);
|
||||
|
||||
gInt& operator+=(const gInt& right);
|
||||
gInt& operator-=(const gInt& right);
|
||||
gInt& operator*=(const gInt& right);
|
||||
gInt& operator/=(const gInt& right);
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, const gInt& value);
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue