Discussion Board
Problem passing enumeration to constructor
2003-11-25, 07:46
#1
Regular Contributor
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?
Registered User
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
Regular Contributor
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
=)
Nokia Developer Expert
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
Forum Rules