C_CPP/04_UDEF/RationalNumber.hpp

13 lines
396 B
C++
Raw Normal View History

2018-03-09 09:47:53 +01:00
// file: RationalNumber.hpp
#include <iostream>
struct RationalNumber{
int zaehler;
int nenner;
};
RationalNumber addRationalNumbers(RationalNumber left, RationalNumber right);
RationalNumber operator+ (RationalNumber left, RationalNumber right);
std::string as_string(RationalNumber); // for println()
//std::ostream& operator<< (std::ostream& os, RationalNumber &toBePrinted); // for cout