TUint to TDesC8&

Login to reply to this topic.
Fri, 2005-04-22 03:36
Joined: 2004-08-25
Forum posts: 32
Hi all,

I want to make use of the function CSdpAttrValueList->BuildUintL(). I want to set the Uint to be 2. But this function has input parameter of type TDesC8&. Does anyone know how can I cast TUint8 to TDesC8&?

Thanks,
Vincent

Fri, 2005-04-22 07:09
Joined: 2004-07-08
Forum posts: 13
TUint to TDesC8&
TUint8 aInt8;
TDes8 aDes8;
aDes8.AppendNum(aInt8);
Fri, 2005-04-22 09:36
Joined: 2004-07-28
Forum posts: 1379
TUint to TDesC8&
Quote from: hungpk
TUint8 aInt8;
TDes8 aDes8;
aDes8.AppendNum(aInt8);

No, TDes8 is an abstract descriptor type:

Code:
TUint8 aInt8;
TBuf8<20> aDes8;
aDes8.AppendNum(aInt8);

didster

Fri, 2005-04-22 10:31
Joined: 2004-07-08
Forum posts: 13
TUint to TDesC8&
Thank didster. I know it but I have mistake in copy/paste.
  • Login to reply to this topic.