c++ operator[ ]下标符号问题怎么解决求代码

#include

using namespace std;
#include
struct ho
{
int math;
char jiu;
};
struct hao
{

CList<ho> list;
char operator[](int h)
{
    POSITION pos=list.GetHeadPosition();
    int u = 0;
    while (pos)
    {
        ho dar = list.GetAt(pos);
        if (u == h)
        {
            return dar.math;
        }
    }
}
void add(ho l)
{
    list.AddHead(l);

}

};
int main()
{
ho hm;
hm.jiu = 'l';
hm.math = 'd';
hao h;
h.add(hm);
h[0];
cout << h[0] << endl;
return 0;
}

调试时可以输出h[0]是d
但是它会显示没有与这些操作数匹配的“[]”运算符

求详细代码

你这里又不是数组,又没有重载[]操作符

http://www.cnblogs.com/xiangxiaodong/archive/2012/02/12/2348144.html