sending _LIT as a parameter

Login to reply to this topic.
Wed, 2008-03-19 14:38
Joined: 2008-02-26
Forum posts: 9

i've got a piece of code similiar to the following:

_LIT(a,"asdf");
object = new (ELeave) class;
object->method(a);

and i've set the class::method to receive a parameter of TLitC<4> which works, but i wish to use the method for varying lengths of strings and it seems to require a fixed length for it

so what should i use as the parameter instead of TLitC<#> ?


Wed, 2008-03-19 17:32
Joined: 2007-09-23
Forum posts: 132
Re: sending _LIT as a parameter

You shouldn't be using a type of TLitC anywhere, they are effectively a hidden class type and you shouldn't use them.
Make your parameter const TDesC&

  • Login to reply to this topic.