重载“<<"运算符问题

先看代码

#include  
#include  
#include  
#include  
using namespace std;
const int MAX = 110;
class CHugeInt 
{
    // 在此处补充你的代码
private:
    int x;
    char* y;

public:
    //构造函数
    CHugeInt(int a = 0) { x = a; }
    CHugeInt(const char* b)
    {
        y = new char[strlen(b) + 1];
        strcpy(y, b);
    }

    //重载“+”
    CHugeInt& operator+(CHugeInt& s)
    {
        for (int i = 0; i < strlen(y); i++)
            y[i] += s.x;
        return *this;
    }
    friend int operator+(int a, CHugeInt& s)
    {
        for (int i = 0; i < strlen(s.y); i++)
            a += s.y[i];
        return a;
    }
    friend CHugeInt operator+(CHugeInt& s, int a)
    {
        for (int i = 0; i < strlen(s.y); i++)
            s.y[i] += a;
        return s;
    }

    //重载“<<”
    friend ostream& operator<<(ostream& cout, CHugeInt& s)
    {
        for (int i = 0; i < strlen(s.y); i++)
            cout << s.y[i];
        return cout;
    }

    //重载“+=”
    friend int operator+=(CHugeInt& s, int a)
    {
        return s.x += a;
    }

    //重载前置自增
    friend int operator++(CHugeInt &s)
    {
        return ++s.x;
    }

    //重载后置自增
    friend int operator++(CHugeInt& s, int)
    {
        return s.x++;
    }

};

int  main()
{
    char s[210];
    int n;

    while (cin >> s >> n) 
    {
        CHugeInt a(s);
        CHugeInt b(n);

        cout << a + b << endl;
        cout << n + a << endl;
        cout << a + n << endl;
        b += n;
        cout << ++b << endl;
        cout << b++ << endl;
        cout << b << endl;
    }
    return 0;
}

img


明明代码中有“<<"的重载,为什么编译器给我这样的一个报错

改成
friend CHugeInt& operator+(CHugeInt& s, int a)