TPtrC vs TText
| Fri, 2008-03-14 05:23 | |
|
Hi All, _LIT(KT,"Good boy"); I do not know where is the problem. Please help me urgent Thanks in Advance |
|
| Fri, 2008-03-14 05:23 | |
|
Hi All, _LIT(KT,"Good boy"); I do not know where is the problem. Please help me urgent Thanks in Advance |
|
Forum posts: 1142
Thats some crazy code you have there.
your problem is that Printf on the console does not take a TText* pointer, but a reference to a TDesC.
You can excange your crazy code blob with this:
All the lines in there between, is totally unnecessary and just waste memory and CPU cycles.
Forum posts: 12
Hi alh,
Thanks for Helping
Forum posts: 136
I think you should ask yourself why you tried to cast it to a TText*?
If you see a function called Printf(TSausages& aSausages);
and instead of passing it a TSausages object you tried to pass it a pointer to a TElephant object would you expect it to compile? If not, then why did you attempt a similar thing with TDesC& and TText*?