Uses of structure in C?

Discussion in 'eCommerce' started by ashimagupta, Sep 11, 2014.

  1. #1
    Please tell me friends...............
     
    ashimagupta, Sep 11, 2014 IP
  2. Claudia_A

    Claudia_A Greenhorn

    Messages:
    17
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    13
    #2
    Seems that you are not the first one who had this question. Stumbled upon this tutorial a while back. Maybe it will be useful to you?
    http://www.dotnetperls.com/struct
    Good luck!

    Claudia A.
     
    Claudia_A, Sep 11, 2014 IP
  3. O-D-T

    O-D-T Member

    Messages:
    180
    Likes Received:
    10
    Best Answers:
    3
    Trophy Points:
    43
    #3
    C or C#? or C++? Please be more specific.
     
    O-D-T, Sep 11, 2014 IP
  4. Claudia_A

    Claudia_A Greenhorn

    Messages:
    17
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    13
    #4
    Apologies, O-D-T. It's C#
     
    Claudia_A, Sep 11, 2014 IP
  5. ashimagupta

    ashimagupta Greenhorn

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #5
    C++
     
    ashimagupta, Sep 12, 2014 IP
  6. O-D-T

    O-D-T Member

    Messages:
    180
    Likes Received:
    10
    Best Answers:
    3
    Trophy Points:
    43
    #6
    Structures in C++ are used for data-only structures that you do not need or want any class-like features from. Structures without methods exist for backward compatibility with C libraries as they "look" same in the memory.

    In C++, the only difference between classes and structures is that structs have all their members public by default and classes have all their members private by default.
     
    O-D-T, Sep 15, 2014 IP