비교연산자 오버로딩
c++ 비교 연산자 오버로딩 하기
c++ 비교 연산자 오버로딩 하기
2020.11.05#include #include #include using namespace std; class Cents { private: int m_cents; public: Cents(int cents = 0) { m_cents = cents; } int getCents() const { return m_cents; } int& getCents() { return m_cents; } friend std::ostream& operator