// infint.h
/** 숫자는 string에 저장될것.
-inf<=infint<= +inf
**/
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
class Infint{
private:
string Inf_num;
public:
Infint(); //////////////////////////////////////
Infint(int);
Infint(string);
//~Infint();
int GetInt()const;
string GetInf_num ();
void SetNum(int);
Infint& operator+(int); ///////////////////////////
Infint& operator+(string);
Infint& operator+(const Infint& Inf_o); //////
void operator=(int); /////////
void operator=(const Infint& Inf_o); //////////////////////
void operator+=(int); ///////////////
void operator+=(string); //////////////
void operator-=(int); ///////////
void operator-=(string); ///////
void operator-=(const Infint& Inf_o); /////
void operator++(int); //////
void operator--(int); /////////
friend ostream& operator<<
(ostream& os, const Infint& Inf_o);
};
'C++ > 학교 숙제' 카테고리의 다른 글
string 문자열 뺄셈계산 (0) | 2018.04.15 |
---|---|
string 문자열 덧셈계산 (0) | 2018.04.14 |
session_4_ex infint.cpp(객체 맴버변수가 string 일때) (0) | 2018.04.11 |
session_4_ex infint.cpp(객체 맴버변수가 int일때) (0) | 2018.04.10 |
session_4_ex infint.h(객체 맴버변수가 int일때) (0) | 2018.04.10 |
댓글