enum operator overloading in namespaces

T

thetrueaplus

Hey all. I posted this originally:

http://groups.google.com/group/comp.lang.c++/browse_thread/thread/b1e4b76201ce17f1


I got the enums to work how I like but I am having a problem with the
overloading of the assignment operator:

namespace UserAffilliationType
{
enum UserAffilliationType //
user.getInfo.affiliations.affiliations_elt.type
{
collegeNetwork = 1,
highSchoolNetwork = 2,
workNetwork = 3,
geographyNetwork = 4
};
UserAffilliationType&
UserAffilliationType::eek:perator=(UserAffilliationType& lhs, const
QString &rhs);
}

When mingw32 trys to compile the overloading statment I get

In file included from kernel/FBNKernel_includes.h:22,
from fbNotify.h:27,
from fbNotify.cpp:18:
kernel/FBNKernelEnums.h:35: error:
`facebook::UserAffilliationType::UserAffilliationType&
facebook::UserAffilliationType
::eek:perator=(facebook::UserAffilliationType::UserAffilliationType&,
const QString&)' must be a nonstatic member function
mingw32-make[1]: *** [release\fbNotify.o] Error 1

Any ideas on how I can get something like this to work?

MyUserAffilliationType = MyQString;
 
T

thetrueaplus

I'm trying
class UserAffilliationType
{
enum { vals };
};

It works for the operator, but how do i refrence to the enum?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top