hello,
since last time got answers (thanks),
i've got next question confusing me:
i've got file called elementstable.h, have 2 enums inside. 1 holds elements of periodic system of elements name. functions should. second enum should same, time symbol name of elements.
code:
enum eelementssymbol { h = 1, he, li, be, b, c, // carbon, error: redefinition of enumerator 'c' n, o, f, ne, na, mg, al, si, // more symbol names };
anybody idea why error? , idea how "fix" this?
update
found error didn't understand why comes up.
have enum in file, not same project (but workspace) named eromannumbers, c defined 100.
far know/understand enumeration names "lives" inside enumerations, why double names causing error?
c++11 says explicitly compiler understand:
code:
enum state { enum direction { unknown, unknown, off, left, on right }; };
prior c++11 there ambiguity between estate::unknown , edirection::unknown. had been resolved in c++11 , enumeration constants live in specific namespace, can global namespace , enumeration itself.
Forums Macs Mac Programming
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
Comments
Post a Comment