×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    32

    Проверьте код программы

    Моя первая программа, лежит на sourceforge. Проверьте код и активные объекты. Не компилируется из-за ошибок :

    Code:
    ..\src\messagesession.cpp:52: illegal access from 'CSessionObserver' to protected/private member 'MMsvSessionObserver::'
    ..\src\MessagEServer.cpp:84: illegal access from 'CMessServSess' to protected/private member 'CMessServSess::CMessServSess()'
    ..\src\MessagEServer.cpp:87: illegal use of non-static member

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,764

    Re: Проверьте код программы

    The first is what it says, default inheritance is protected. Fix it by specifying public
    Code:
    class CSessionObserver : public CBase, public MMsvSessionObserver
    The second one is about an attempt to use the constructor of CMessServSess which is explicitly declared private. As it is Symbian C++ code, you should use CMessServSess::NewL/C instead, which is public.
    The third one is about using a non-static member. ThreadFunctionL is a static method, it has no object context. iStat is not static, it would be a member of an object.
    Generally I would suggest removing the threading part from this code, there is no reason for having a thread in this code.

  3. #3
    Registered User
    Join Date
    Jul 2007
    Posts
    32

    Re: Проверьте код программы

    Thanks for you reply. I fix first two. Archive on sourceforge updated.
    What I should do with code in ThreadFunctionL?
    Last edited by SuperZANAC; 2013-09-13 at 20:39.

Posting Permissions

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