#include
using namespace std;
#include
struct ho
{
int math;
char jiu;
};
struct hao
{
CList list;
int operator
{
int u = 0;
POSITION pos = list.GetHeadPosition();
while (pos)
{
ho dat=list.GetAt(pos);
if (h == u)
{
return dat.jiu;
}
list.GetNext(pos);
}
}
void add()
{
ho di;
cin >> di.jiu >> di.math;
}
};
int main()
{
hao h;
h.add();
cout << h[0] << endl;
}
调试时说:
h[0] 没有与这些操作数匹配的“[]”运算符怎么回事求大神解救一下