I put an object of class field, that contains int x and int y. I put it in a stack. The program below is working, but I would like to know how to get the values inside the satck. Something like S.top(p1.GetX). I need to read it from the stack and not accessing the method on class Field. Thanks in advance