Re: illegal name overloading
I think it will depend on the [B]Location[/B] where you are trying to define these two Enums i.e. [B]Scope[/B]. If you are trying to define them in a single class then they will not work. But if tried in two different classes (obviously in the same application) then they should work.
Re: illegal name overloading
I am declaring these two enumerations as outside of any class, and using variables of their type in the same class.
For example
[CODE]enum A
{
....
none
};
enum B
{
none,
....
};
class C
{
A a;
B b;
};[/CODE]
But I am getting the error in the header file itself, where the enums are declared outside any class scope.
Re: illegal name overloading
An enumeration is not a container, it does not provide a scope. Thus "none" is declared twice, and that is the problem.
It is good to know and good to remember. There was a thread where someone was developing a code for years, and it worked on everything up to S60 3rd FP1 (including S60 2nd editions too). Then S60 3rd FP2 came, and introduced some enumerations in the middle of the camera engine, clashing with his own ones. That was a slightly mystical one to find out, but it was exactly the same thing you are depicting here.
Re: illegal name overloading