lab.cpp/tp2/ZFraction.h

28 lines
331 B
C++

#ifndef DEF_ZFRACTION
#define DEF_ZFRACTION
#include <iostream>
#include <string>
using namespace std;
class ZFraction{
public:
ZFraction(int a=1, int b=1);
void toString() const;
ZFraction& operator+=(ZFraction const& operand);
private:
int a;
int b;
};
#include "ZFraction.cpp"
#endif