enum members namespace clash

  • Thread starter Bilgehan.Balban
  • Start date
M

Michael Wojcik

Macro can expand to expressions of types other than `int'.

Also not what we were talking about. We were specifically discussing
the cases where either an enumeration or a macro could be used.
 
C

CBFalconer

Michael said:
Also not what we were talking about. We were specifically
discussing the cases where either an enumeration or a macro
could be used.

And enums yield identifiers that are visible in debuggers, which
macros don't. Enums are much easier to modify when you want a
sequence of identifiers.

Decide how you are likely to change it in the future, and how it
should interact with other things, and then decide how to define
it.

--
Some useful references about C:
<http://www.ungerhu.com/jxh/clc.welcome.txt>
<http://www.eskimo.com/~scs/C-faq/top.html>
<http://benpfaff.org/writings/clc/off-topic.html>
<http://anubis.dkuug.dk/jtc1/sc22/wg14/www/docs/n869/> (C99)
<http://www.dinkumware.com/refxc.html> (C-library}
<http://gcc.gnu.org/onlinedocs/> (GNU docs)
 

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,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top