how to access private variables with out using friend function in c++
<pre><code>#include &lt;iostream&gt;

using namespace std;
class Point
    {
    friend void ChangePrivate( Point &amp; );
    public:
    Point( void ) : m_i(0) {}
    void PrintPrivate( void ){cout &lt;&lt; m_i &lt;&lt; endl; }

private:
int m_i;
};

void ChangePrivate ( Point &amp;i ) { i.m_i++; }

int main()
{
     Point sPoint;
     sPoint.PrintPrivate();
     ChangePrivate(sPoint);
    sPoint.PrintPrivate();
}
</code></pre>

<p>here is the example how to access private variables using friend function how to use without using friend funtion?</p>
