Read-only archive of the All About Symbian forum (2001–2013) · About this archive

TBuf<> and TDesC8

1 replies · 3,940 views · Started 19 October 2004

Hi,
I haven't quite grasped the thing with descriptors yet. I have a TBuf<10>
that I intend to give as a parameter to a function taking a const TDesC8&
argument. However, this gives a compilation error, but in the documentation on "Descriptors" I can see that TBuf<> inherits from TDes and from TDesC - isn't that true? How can I pass this TBuf<10> as an argument to the TDesC8& argument function? (I can't change the argument) /Joachim

joape382 wrote:Hi,
I haven't quite grasped the thing with descriptors yet. I have a TBuf<10>
that I intend to give as a parameter to a function taking a const TDesC8&
argument. However, this gives a compilation error, but in the documentation on "Descriptors" I can see that TBuf<> inherits from TDes and from TDesC - isn't that true? How can I pass this TBuf<10> as an argument to the TDesC8& argument function? (I can't change the argument) /Joachim

The problem is that TBuf = TBuf16. You can't pass a 16 bit descriptor to a function expecting an 8 bit argument.

- Trent