For example I have an vector of objects and they all have attribute PointX so I want to check if all of them have the same value of PointX and if they have it should return true or false whatever.

So in a kind of pseudo-code:

```
IF ( Object[1].getPointX() == Object[2].getPoint(x) == Object[3].getPoint(x) ){
      return true;
      }

```

The problem is that I have more than 55 objects so there has to be a way to compare them without writting them all individually. I know there must be with a for loop but still I have no idea.

thanks in advance.

edit:
@awesomeyi your suggestion seems the easiest and more adequate to my needs (I'm not saying the others are not but I think they are too complicated for a newb like me) but it's not working, even if Xpoints are all the same or different it always returns false. here's what i have: 

```
bool allKilled(){ 
auto checkpointx = Invader[0].getIfActive(); 
for(int i = 0; i < 55; ++i){ 
if(Invader[i].getIfActive() != checkpointx){
 return false;}
}
}

```

the getIfActive() just returns if its true or false, and i want this method to return true if all Active (attribute of the object) of all objects are all false.