Jump to content
  • Advertisement


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


typedef enum

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

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!