How to initialize the shared_ptr to a structure
<p>I have two definitions of structure.</p>

<pre><code>struct ST1               
{                        
  int iVar1;               
  int iVar2;             
  float iVar3;
};

struct ST2
{
 std::shared_ptr&lt;ST1&gt; p_sVar4;
};

ST2 structure2; 
</code></pre>

<p>I try to initialize <code>structure2</code> :</p>

<pre><code>structure2.p_sVar4 = new ST1();
</code></pre>

<p>but that is wrong. </p>

<p>How to initialize <code>structure2</code>? </p>