Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

alchemar

typedef enum

This topic is 5483 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

Advertisement
in c++ there is no diference, but in c if you use "enum e" then to declare a variable of that type you must do:

enum e var;

if you use typedef you just need to "e var;"



To be considered a genius you just have to say what everybody knows in a way very few understand

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I maybe wrong, but I think, it''s a C thing. You can''t use any types untill you typedef them in C. With introduction of classes to C++, that would have been too much of a pain in the butt to preserve (imagine having to typedef all classes, too), so that dropped the requirement.

Again, that''s what I seem to recall from my compilers class, I may be wrong...

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!