illegal explicit conversion..

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

illegal explicit conversion..

3,149 Views
cybil001
Contributor I
hi.i m receiving the following error in my prog[using code warrior n s60 sdk] in my program :
 
'illegal explicit conversion from 'const TLitC<14>' to 'TBuf<32>'
 
wat is the prob?n i m a newbie !
 
tnx
Labels (1)
0 Kudos
4 Replies

366 Views
CompilerGuru
NXP Employee
NXP Employee
I just intended to redirect you to the Nokia forum, then I saw you asked the same question there already.
http://discussion.forum.nokia.com/forum/showthread.php?p=272213

So I hope they can help better with your problem. Given the error message it looks like you try to covert to no related structs/classes.

Daniel
0 Kudos

366 Views
Alban
Senior Contributor II
Hello,

I don't use this version of CodeWarrior, but this error message tells me that you do TYPE CASTING and that the types are not compatible.

Have a look at the statement in error and you will see you are trying to put a "TLitC" in a "TBuf". These two objects are different.

Cheers,
Alban.
0 Kudos

366 Views
cybil001
Contributor I
well actually i hav taken this code from  a friend whois not available now. the part which is being highlighted as having error doesnt seems to hav these tbuf n tlit. i m pasting the error part :
 
void CMyBTListener::Inquire()
{
 _LIT(KL2Cap,"BTLinkManager");
  User::LeaveIfError(socksvr.FindProtocol((TProtocolName)KL2Cap,protocolInfo));
   User::LeaveIfError(hr.Open(socksvr,protocolInfo.iAddrFamily,protocolInfo.iProtocol));
0 Kudos

366 Views
CrasyCat
Specialist III
Hello
 
As far as I can tell from your original message, you are using CodeWarrior for Symbian.
Am I right?
 
If this is the case I would highly recommend you to go to Nokia forum for assistance.
This forum does not cover CodeWarrior for Symbian.
 
Thanks for your understanding.
 
CrasyCat
0 Kudos