Jump to content
  • Advertisement
Sign in to follow this  
Calin

C++ enum

This topic is 3319 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can an enum be declared at global scope, i.e in a header file,rather then the class body

Share this post


Link to post
Share on other sites
Advertisement
I have them, I made the attempt to compile it, couldn't elaborate. It falls in the lines of with one of my other recent threads, didn't want to bother people with it much

[Edited by - Calin on April 21, 2009 2:47:45 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Hodgman
Yes. The names of the items in the enum are put into the global namespace though.

I like doing something along the lines of
namespace enum_name
{
enum type
{
...
};
}

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!