So, as far as I understand the quadtree, you divide the gamefield into smaller sectors and this allows you to make a only collision detection with the elements which are located in one sector. Right? I'm not sure if I'm yet good enough to implement this, though I can try it. Although it looks like Box2D can do exactly that, as per Zael's post?
Edit: I think I managed it I used, like suggested by Zael, Box2D for collision detection and SFML for rendering the graphics. I'm still getting a stack overflow with more than 1700 objects, but everthing below that works perfectly fine. Thanks again for the help!
Edit 2: The stack overflow is caused due to a too big array. I switched over to a pointer, which solved the problem.
Thanks, sounds like a better idea indeed, but as far as I know, Box2D is only a physic library? I'm not quite sure yet how to connect a graphic library with a physic library... are there any good tutorials around? I already had a look at the provided examples of Box2D - the "Testbed". But I'm a little bit confused by it, because it contains a lot of things which I don't need. I would prefer to have a look at a simple collision detection example to understand the libraries better.
This algorithm probably will work perfectly for 80 bacterias- will it work also for around 2000?