Working with objectives and calling methods?
<p>I've probably become a bit to used to Java and am finding this harder than it should be. Heres what I have.</p>

<pre><code>myObject[0] = new item1(this);

class item1
{
private:
    int x;
    int y;

public:    
    item1( passedPointer* pOne )
    {
        x = 5;
        y = 5;
    }

    int returnX() { return x; }

    int returnY() { return y; }
}
</code></pre>

<p>Then in another method I thought I could just say:</p>

<pre><code>void check()
{
    int y = item1.returnY();
    int x = item1.returnX();            
}
</code></pre>

<p>But I am getting the common error: a nonstatic member reference must be relative to a specific object.</p>

<p>There is only one instance of this class item1, what would be the best way to do this? This is just a simplified fragment of what I'm actually doing, not the actual code. </p>
