For learning purposes I'm creating big integer class in C++. There are 2 files:
big_int.h
#ifndef BIG_INT_H
#define BIG_INT_H
#include
class big_int
{
public:
big_int(void);
big_int(char*);
big_int(QString);
~big_int();
big_int operator+(big_int);
big_int operator-(big_int);
big_int operator*(big_int);
big_int operator/(big_int);
};
#endif // BIG_INT_H
big_int.cpp
#include "big_int.h"
big_int::big_int()
{
}
big_int::big_int(QString str)
{
}
big_int::~big_int()
{
}
big_int operator+(big_int b)
{
return big_int();
}
big_int operator-(big_int b)
{
return big_int();
}
big_int operator*(big_int b)
{
return big_int();
}
big_int operator/(big_int)
{
return big_int();
}
Qt Creator returns: C:/Documents and Settings/Admin/My Documents/calculator_1_0/big_int.cpp:31: error: big_int operator/(big_int) must take exactly two arguments. But operator/ takes only 1 parameter. What`s wrong?