When to use which?

This is a discussion on When to use which? within the C++ Programming forums, part of the General Programming Boards category; Hi all! I was wondering when to use structures and when to use enum's? this would be a big help ...

  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    38

    When to use which?

    Hi all!

    I was wondering when to use structures and when to use enum's? this would be a big help to me if you could respond and would help me understand, which in turn, will probably help me write better programs. thanks!
    #include <Jesus.h>
    It will save your life

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    use structs/classes when defining a new type.
    use enums when u need a list of enumerated constants.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21