Weird name collission

G

Guest

How can a member of an enum type, like

typedef enum tagMPEG4Mode
{
None = 0,
Divx = 1,
Microsoft = 2,
} MPEG4Mode;

collide with a namespace, like Microsoft ? These are both third party
libraries - how can I solve the name collission?
 
D

Doug Harrison [MVP]

How can a member of an enum type, like

typedef enum tagMPEG4Mode
{
None = 0,
Divx = 1,
Microsoft = 2,
} MPEG4Mode;

collide with a namespace, like Microsoft ?

In C++, enum members aren't scoped to the enum but rather to the enclosing
namespace.
These are both third party
libraries - how can I solve the name collission?

You could rename the enumerator or enclose the enum in a namespace for the
library. Either way, you may have to recompile the library, but the odds
are much worse for the latter.
 

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

Top