what is the difference between "struct" and "class"?

Discussion in 'C++' started by XiongBin, Oct 26, 2005.

  1. XiongBin

    XiongBin Guest

    anybody who tell me: what is the difference between "struct" and
    "class"?
    :)
     
    XiongBin, Oct 26, 2005
    #1
    1. Advertising

  2. XiongBin

    Guest

    struct members are public by default
     
    , Oct 26, 2005
    #2
    1. Advertising

  3. XiongBin

    Guest

    except the default access popedom, there is only felling left
     
    , Oct 26, 2005
    #3
  4. XiongBin

    Tim Love Guest

    Tim Love, Oct 26, 2005
    #4
  5. "XiongBin" <> schrieb im Newsbeitrag
    news:...
    > anybody who tell me: what is the difference between "struct" and
    > "class"?
    > :)
    >


    Except the default access public/private, the default inheritance is
    different, too. For structs the default inheritance is public, for classes
    it is private. IIRC this is not written in the FAQ.

    Greetings Chris
     
    Christian Meier, Oct 26, 2005
    #5
  6. XiongBin

    Ferdi Smit Guest

    XiongBin wrote:
    > anybody who tell me: what is the difference between "struct" and
    > "class"?
    > :)
    >


    Another tiny issue is that you can only use the keyword class in a
    template template parameter, and not struct. But then we're speaking of
    keyword, and not an actual entity.

    --
    Regards,

    Ferdi Smit (M.Sc.)
    Email:
    Room: C0.07 Phone: 4229
    INS3 Visualization and 3D Interfaces
    CWI Amsterdam, The Netherlands
     
    Ferdi Smit, Oct 26, 2005
    #6
  7. XiongBin

    Default User Guest

    wrote:

    > except the default access popedom, there is only felling left


    What?



    Brian

    --
    Please quote enough of the previous message for context. To do so from
    Google, click "show options" and use the Reply shown in the expanded
    header.
     
    Default User, Oct 26, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jakk
    Replies:
    4
    Views:
    12,388
  2. Robben
    Replies:
    3
    Views:
    537
    tmartsum
    Sep 7, 2005
  3. Ook
    Replies:
    22
    Views:
    860
    Fabio Fracassi
    Oct 5, 2005
  4. Replies:
    4
    Views:
    394
    James Kanze
    Oct 11, 2007
  5. Pep
    Replies:
    4
    Views:
    837
    James Kanze
    Sep 10, 2009
Loading...

Share This Page