So I got a number what I want to convert to a string. Under windows I do it with the
_fcvt
function, which is not supported under symbian. I saw that TDes has a .Num() function. But how can I add a value to the TDes (a string)? Than I have to copy it back to a char* with
strcat.
(I am porting a c code.)
But I cannot add value to TDes, and cannot cast it to be able to copy it back.
Forum posts: 192
namelen = User::StringLength(pString);
TPtrC8 tmp(pString,namelen);
Forum posts: 24
const char* CALLSENDER_EVENT;
TPtrC8 ptr((const TUint8*)CALLSENDER_EVENT));
Forum posts: 12
Thanks for the fast reply and your help, its fantastic, its working!:)
BTW I have an additional question: how can I convert a TDes to char*?
Thanks again in advance!
Best regards,
Balint Toth
Forum posts: 12
So I got a number what I want to convert to a string. Under windows I do it with the
_fcvt
function, which is not supported under symbian. I saw that TDes has a .Num() function. But how can I add a value to the TDes (a string)?
Than I have to copy it back to a char* with
strcat.
(I am porting a c code.)
But I cannot add value to TDes, and cannot cast it to be able to copy it back.
Thanks for your help in advance!
Best regards,
Balint Toth
Forum posts: 192
{
TBuf8<10> tmp;
TInt len;
tmp.Num(value);
len = tmp.Length();
Mem::Copy(pString,tmp.Ptr(),len);
pString[len] = 0;
return pString;
}
Forum posts: 12
Best regards,
Balint Toth[HUN]
Forum posts: 192