Dynamic memory allocation with default values
<pre><code>class A
{
private:
int m_nValue;
public:
A()
{
m_nValue = 0;
}
A(int nValue)
{
m_nValue = nValue);
~A()
{}
}
</code></pre>

<p>Now in main if i call </p>

<pre><code>A a(2);// 2 will be assigned for m_nValue of object A.
</code></pre>

<p>Now how do we do this if i want to define an array of objects.
Also how do we do this if i dynamically create objects using operator new
like </p>

<pre><code>A *pA;
pA = new A[5];// while creating the object i want the parameterised constructor to be 

//called
</code></pre>

<p>I hope the question is clear. Do let me know if more explanation is needed</p>
