Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor schmeichel's Avatar
    Join Date
    May 2008
    Location
    Beijing, China
    Posts
    180
    I have a few questions about Symbian C++ as below, could you help to answer them? thanks.

    1. why we can't implement codes like this? what's its problem?

    class CMyClass : CBase
    {
    public:
    CMyClass(){
    CleanupStack::PushL(this);
    // do initialization that may ccause leave...
    CleanupStack::Pop(); // this
    }
    };

    2. why we need to provide an implementation of constructor of C class? Even it is an empty implementation in .CPP file, and how about implement it by inline in .H file?

    3. When we should use HBuf? And, when we should use HBufC? what is their differences?
    -- KEEP GOING..

  2. #2
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    1. Now it is a convention only, the code snippet is expected to work. In older days it was really necessary.
    2. That is a misunderstanding. There is no need for empty constructors.
    3. I guess you have wanted to write RBuf. It is simply newer than HBufC, main features are that it is a modifiable descriptor and it can be passed around by value. You still need HBufC when an API mandates it, or you want to support NULL-ness for some reason.

Similar Threads

  1. Few questions about publishing Qt/Symbian app to OVI store
    By VEIKKO99 in forum [Closed] Publishing to Nokia Store
    Replies: 3
    Last Post: 2011-03-09, 15:29
  2. A few questions about application packaging.
    By hamishwillee in forum Python
    Replies: 3
    Last Post: 2009-07-23, 06:46
  3. few questions about console application
    By reuvend in forum Symbian C++
    Replies: 5
    Last Post: 2008-07-17, 10:31
  4. Few questions about FTP uploading
    By Camelus in forum Python
    Replies: 4
    Last Post: 2006-10-27, 11:39
  5. A few questions about Series 60 Symbian...
    By dwneonstar in forum Symbian C++
    Replies: 0
    Last Post: 2003-03-24, 04:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved