Hi I'm new to the std library.
I have a function which reads data and creates a std string from it.
I want to pass that back to the calling function as a parameter, not as the
function return.
I have tried various indirections etc but nothing works.
I want something like this psudo type code:
typedef basic_string<TCHAR> tstring; // string of TCHARs
BOOL readFunction(tstring *pret)
{
tstring * ptstrpage = new tstring;
..
..
ptstrpage = loaded data
pret=ptstrpage;
return(TRUE)
}
callingfunc
{
tstring * pData1,pData2;
if(!readFunction(pData1)
{
error processing
}
if(!readFunction(pData2)
{
error processing
}
delete pData1,pData2;
}