What's wrong with this code?
char* PutDataInMemory (const CString &rkcstrData)
{
int nDataSize = rkcstrData.GetLength();
char buffer[2000];
char *pdata = buffer;
for (int nCounter=0; nCounter < nDataSize; nCounter++)
{
pdata[nCounter] = rkcstrData.GetAt(nCounter);
}
return pdata;
}
|