$ 0 0 Your iteration variable has the same name as your member variable. Change the iterator (ent1) variable to a different name.