Q:

How to compare vector?

How to compare two vectors? Both cointains integer values:
void interaction(vehicles::position &pos, int number, enviroment object)
{
    for (auto i = object.x.begin(); i<object.x.end(); i++)
        for (auto j = object.y.begin(); j<object.y.end(); j++)
            if (pos.x[number] == object.x[i] && pos.y[number] == object.y[j])
                cout << "\nInteraction\n";
}

First vector (declared in class):
int remaining_move;
     struct position{
         vector<int> x;
         vector<int> y;
     }pos;

Second:
struct enviroment
{
    vector<int> x;
    vector<int> y;
    string graphic;
};

Errors:

A:

object.x[i] 

This is wrong. It would work if i were a numeric index, but it's not: it's an iterator.
Instead:
*i

I therefore further suggest calling it something other than i; how about it?
Also, your inner loop condition is wrong. You wrote i, rather than j. Twice. [edit: and now you've fixed that in the question, for some reason]

