How can i use the x and y values of lastLoc object in another function like in the following code. I get no errors but when i print the values of lastLoc in the getPosLoc function I get a long number(possibly address): 

```
class solveMaze {
private:
    maze maze;
    mouse m;
    stack<coords> coordStack;
    int x;
    int y;
    int posLocCount = 0;
    coords lastLoc;
};

solveMaze::solveMaze() {
    x = m.x;
    y = m.y;
    coords c(x, y);
    coords lastLoc(c.x, c.y);
    coordStack.push(c);
}

void solveMaze::getPosLoc() {
    if((mazeLayout[x][y-1] == 0) && (x != lastLoc.x) && (y-1 != lastLoc.y)) {
        posLocCount++;
        putUp();
    }

```

this is the coords.h removed irrelevant functions to shorten the code:

```
class coords {
    public:
        coords(){};
        coords(int, int);
        int x;
        int y;
        friend ostream &operator<<(ostream &output, const coords &c);
        bool operator==(coords);
        void operator=(const coords &b);
};

coords::coords(int a, int b) {
    x = a;
    y = b;
}

```

this is mouse.h:

```
class mouse {
    private:
        maze maze;
    public:
        mouse();
        int x;
        int y;
};

mouse::mouse() {
    for (int i=0; i<12; i++) {
        for (int j=0; j<29; j++) {
            if (mazeLayout[i][j] == 8){
                x = j;
                y = i;
            }
        }
    }
}

```