[aspectc-user] ac++ doesnt support "iterator->"???

Yan Mao maoyan at gmx.net
Mon Jul 24 13:46:09 CEST 2006


Hi there,

i have a list of class object, and try to call their member function iterally.

for example, in my normal main function, there is code:
list<CClass> objectList;
objectList=........
list<CClass>::iterator objectPos = objectList.begin();
while(objectPos != objectList.end()){
	cout << "object name is: " << objectPos ->getCriName()  << endl;
	objectPos ++;
}
then i'll get the error message:
error: left operand of `->' not pointer to class object

But if i change to
	cout << "object name is: " << (*objectPos).getCriName()  << endl;
it works.

So, does it mean, ac++ doesnt support "iterator->"??? 

thanks,

Yan

-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit!
"Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl



More information about the aspectc-user mailing list