×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    318

    Problem passing enumeration to constructor

    Hi

    From a.cpp i'm trying to pass a enumeration to the constructor of b.cpp. The enumeration is defined in a.h as

    enum TProgressLevel
    {
    EF2FNoProgress,
    EF2FDeviceFound,
    EF2FServiceFound,
    EF2FMatchFound
    };

    TProgressLevel iF2FProgress;

    b.cpp's constructor looks like this:

    TBTAttributeValueLister::TBTAttributeValueLister(MReporter& aReporter, TProgressLevel& aF2FProgress)

    I get the error:

    error C2629: unexpected 'class TBTAttributeValueLister ('

    any idea?

  2. #2
    Registered User
    Join Date
    Aug 2003
    Location
    Oulu, Finland
    Posts
    1,122
    Looks like the problem is not passing the enum. More there's an error (like a missing semicolon) just before the line the compiler complains about.

    Lauri

  3. #3
    Regular Contributor
    Join Date
    Jun 2003
    Posts
    318
    Hmm

    i know what u're talking about, but i don't think that is the problem coz when i re-edit (manually, not ctrl-Z) all the code back to the original code that supports only one param, like this:

    TBTAttributeValueLister::TBTAttributeValueLister(MReporter& aReporter)

    without the enum parameter, it compiles fine......

    Thanks all the same laa-laa

    =)

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165
    Hi

    Why don't you just handle the enums as integers, like this:

    TBTAttributeValueLister::TBTAttributeValueLister(MReporter& aReporter, TInt aF2FProgress)

    should work.

    yucca

Posting Permissions

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