I suggest you post the files you use (both .h and .cpp) with just the declaration of the classes (excluding anything between brackets).Quote:
Another solution is to (from main.cpp) give a pointer to the list as a parameter to every fish so they can have a reference to it and then give that reference to the boids.cpp algorithm when it needs to use it. But this is stupid since the refence needs to go through fish.cpp - which really doesn't need that reference for itself at all.
This way you can get a better advice, since there are two separate issues.
1) The class design
2) The linkage of the file
These are not necessarily linked together