
ok thanks !!! On Aug 21, 2008, at 1:12 AM, Ben Webb wrote:
> Keren Lasker wrote: >> I am using the latest version, updated an hour ago. >> The code is: >> Particles r_particles; >> for(ParticlesList::iterator it1 = >> r.get_interacting_particles().begin(); >> it1 != r.get_interacting_particles().end(); it1++){ >> std::cout<<it1->size()<std::endl; > for(Particles::iterator it2 = it1->begin(); it2 != it1->end(); >> it2++) { >> r_particles.push_back(*it2); >> } >> } > > Since get_interacting_particles() returns a new vector, you're > trying to > iterate from the start of one list to the end of an entirely different > one. Like Daniel says, same problem as last time. Your second code > snippet uses only one ParticlesList though (pl) so it should work > fine - > assuming you actually initialize it to something useful somewhere. > > Ben > -- > ben@salilab.org http://salilab.org/~ben/ > "It is a capital mistake to theorize before one has data." > - Sir Arthur Conan Doyle > _______________________________________________ > IMP-dev mailing list > IMP-dev@salilab.org > https://salilab.org/mailman/listinfo/imp-dev