template <class type>
class BigInteger
{
private:
const type base = (1 << sizeof(type) * 4) - 1;
vector<type> digits;
public:
friend istream& operator >> (istream& in, BigInteger<type> object);
};
istream& operator >> (istream& in, BigInteger<type> object)
{
string input;
in >> input;
for (auto i = input.rbegin(); i != input.rend(); i++)
{
object.digits.push_back(*i);
}
return in;
}
Ошибка: E0020: идентификатор "type" не определен
Как исправить ее в моем случае?
template <class type>перед оператор не хватает – user7860670 Jul 17 '20 at 20:59typeпо второму параметру, так же, как с обычной функцией. – HolyBlackCat Jul 17 '20 at 21:14