×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Error: illegal implicit conversion from 'CSmsServiceCenter *'

    Hi

    i try to get service center address at CreateMsg time. if service center number defined than i try to get default service number.
    than in this line give me error at debug time.

    Code:
    CSmsSettings* serviceSettings = &( iSmsMtm->ServiceSettings() );
    
    if ( !serviceSettings->ServiceCenterCount() )
    {
    	_LIT(KMsg,"No service center number defined.");
          
    	CFileLogger::WriteLogL(KMsg );
    
            // Remember to pop settings even if this branch is taken.
            CleanupStack::PopAndDestroy( settings );
    	return EFalse;     // quit creating the message
    }
    else
    {
    	CSmsNumber* smsCenter = &(serviceSettings->GetServiceCenter( serviceSettings->DefaultServiceCenter() ) );
    }
    i Get Error at send sms coding time like:

    src\SMSSender.cpp(678): error: illegal implicit conversion from 'CSmsServiceCenter *' to
    src\SMSSender.cpp(678): error: 'CSmsNumber *'


    please tell me why this type of error come.


    Regards
    Tanya

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: Error: illegal implicit conversion from 'CSmsServiceCenter *'

    If you are trying it in S60 v3.x then you have to do like below

    Code:
    #ifdef EKA2
    CSmsNumber* smsCenter= CSmsNumber::NewL();
    CleanupStack::PushL(smsCenter);
    smsCenter->SetAddressL((serviceSettings->GetServiceCenter( serviceSettings->DefaultServiceCenter())).Address());
    header.Message().SetServiceCenterAddressL( smsCenter->Address() );
    CleanupStack::PopAndDestroy(smsCenter);
    #else
    CSmsNumber* smsCenter = &( serviceSettings->SCAddress( 
    serviceSettings->DefaultSC() ) );
    #endif

  3. #3
    Regular Contributor
    Join Date
    Nov 2006
    Location
    Rajkot
    Posts
    430

    Thumbs up Re: Error: illegal implicit conversion from 'CSmsServiceCenter *'

    Thanks SKumar

    it's work.

    Again Thank You.

    Regards
    Tanya

Similar Threads

  1. GoogleIt
    By deepika.mangla in forum Symbian
    Replies: 5
    Last Post: 2011-05-28, 11:04
  2. Parsing file content
    By hendrawan.ashari in forum Symbian
    Replies: 7
    Last Post: 2007-03-09, 10:41
  3. Image conversion utility in Series 60 3rd Edition SDK Beta
    By waelali in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2006-03-03, 17:23
  4. descriptor conversion problem?
    By ipis in forum Symbian
    Replies: 1
    Last Post: 2005-10-19, 10:58

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×