So I’ve looked up the issue and used the given solutions and came up with this piece of code:
list<Projectile*>::iterator bullet;
for(bullet = bullets.begin(); bullet != bullets.end(); bullet++)
.
.
.
}
Problem: No operator ‘=’ matches these operands. The same with != …
I’m clueless as to why :/
At least based on your comment, you’re attempting to use a
list<Projectile *>::iteratorwhere alist<Projectile>::iteratoris needed.As an aside, 1)
listis rarely the best choice of containers, and 2) most of the time, you’re better off iterating through a collection with a pre-packaged algorithm instead of writing a loop.