Calling a class member function inside definition of the other member function of same class
<p>What is the method to call a memberfunction of a class inside definition of the other member function of same class?</p>

<p>For Ex:
File:
header.h  </p>

<pre><code>class A
{
public:
void fn1();
void fn2();
};
</code></pre>

<p>Now in cpp file:
function.cpp</p>

<p>method1:</p>

<pre><code>#include"header.h"
void A::fn1()
{
//function body for fn1()

//What is the way to make a call for fn2()?
//assume I have definition of fn2() above similar to fn1()

fn2();
} 
</code></pre>

<p>method2:</p>

<pre><code>#include"header.h"
A obj_A;
void A::fn1()
{
//function body for fn1()

//What is the way to make a call for fn2()?
//assume I have definition of fn2() above similar to fn1()

obj_A.fn2();
} 
</code></pre>

<p>Please clarify which method is correct?</p>

<p>Thanks,
A beginnner in C++.</p>
