all groups > visual c > november 2007 >
You're in the

visual c

group:

name conflicts in enum


Re: name conflicts in enum Cholo Lennon
11/2/2007 12:00:00 AM
visual c:
You have to put them in different namespaces, otherwise the code doesn't
compile. If you do that, you can refer enum values using namespace name.

Regards

--
Cholo Lennon
Bs.As.
ARG


[quoted text, click to view]

Re: name conflicts in enum Cholo Lennon
11/2/2007 12:00:00 AM
BTW... this is a newsgroup for C++ CLI so I suppose that you're using it. You
can use 'enum class' instead of C++ enum. Enum class values don't have the
problem of scope visibility (present in C++ enum values).

Regards

--
Cholo Lennon
Bs.As.
ARG


[quoted text, click to view]

name conflicts in enum George
11/2/2007 2:29:01 AM
Hello everyone,


Suppose I have two enums which has an item with the same names -- but
different values,

[Code]
enum foo {

NAME = 100;
}

enum goo {

NAME = 200;
}
[/Code]

Are there any ways to specify whether I need to access NAME in foo or NAME
in goo?


thanks in advance,
Re: name conflicts in enum George
11/2/2007 8:19:08 AM
Hi Cholo,


Could you recommend me a better newsgroup which is more suitable for my
question please? Thanks.


regards,
George

[quoted text, click to view]
Re: name conflicts in enum George
11/2/2007 8:19:09 AM
Thanks Cholo,


It works! Cool!


regards,
George

[quoted text, click to view]
Re: name conflicts in enum Cholo Lennon
11/2/2007 12:49:43 PM
- microsoft.public.vc.language
- microsoft.public.vc.atl (for your question about COM)

Regards

--
Cholo Lennon
Bs.As.
ARG


[quoted text, click to view]

Re: name conflicts in enum George
11/2/2007 10:31:00 PM
Thanks Cholo!


regards,
George

[quoted text, click to view]
AddThis Social Bookmark Button