value of local variable is gone?
<p>I have this implementation: </p>

<pre><code>//header file:

InfoTables* localInforTable;

typedef txdr_int32 InfoTable;

typedef struct
{
  int sendID;
  InfoTable *data;
} InfoTables;

// in cpp file
void Retrieval::InfoTableCallBack(int sendID,
                  InfoTables&amp; infoTables)
{
    localInforTable = new InfoTables();

    localInforTable.sendId=sendID;
    localInforTable-&gt;data = infoTables.data;

    printf("Data %d, %d\n", localInforTable.sendId, localInforTable-&gt;data[0]); // correct data
}

void Retrieval::CheckInfoData()
{
    printf("Data %d, %d\n", localInforTable.sendId, localInforTable-&gt;data[0]); // sendID is OK but data9[0] is just printing the address
}
</code></pre>

<p>I want to copy inforTables in the method InforTableCallBack to a local variable that I can use for other methods. However the data is clean up in CheckInfoData()?</p>
