For example:
typedef struct tagTestStruct1
{
int data1;
int data2;
} TestStruct1;
typedef struct tagTestStruct2
{
int data3;
int data4;
} TestStruct2;
void test(void)
{
int data;
list<TestStruct1> test1;
list<TestStruct2> test2;
for(list<TestStruct1>::iterator it=test1.begin();it!=test1.end();it++)
{
data=it->data1;
}
for(list<TestStruct2>::iterator it=test2.begin();it!=test2.end();it++)
{
data=it->data3;//Wrong member hint and can't identify "data3" declaration
}
}
The second "it" is identified with the first one.