from Wiktionary, Creative Commons Attribution/Share-Alike License

  • n. A data structure, especially one that serves to group a number of fields (in contrast to an object-oriented class with methods) or one that is passed by value rather than by reference.


from Wiktionary, Creative Commons Attribution/Share-Alike License

Abbreviation of structure, used as a keyword in the C programming language and its descendants.


  • PyLongObject is defined as a struct of type _longobject within the header

  • This tells the CLR that the integer i and the double d are both at offset zero (that is, the first items) in your struct, which makes them overlap and, in effect, the struct is a union.

    MSDN Magazine: RSS Feed

  • The Linux kernel keeps complete information about a process in a process descriptor defined as struct task_struct.

    LXer Linux News

  • I would agree with you if the "struct" thingy you describe were an static inner class.

    Technology Snake Oil

  • While printing the values I get the following error: error C2232: '- > CheckSumPair: trongCS': left operand has 'struct' type, use '.' error C2819: type 'CheckSumPair' does not have an overloaded member 'operator - >' see declaration of 'CheckSumPair'

    DaniWeb IT Discussion Community

  • C++ classes are natural evolution of C struct which is a collection of related variables whereas a class contains both variables (data members) and functions (member functions) that manipulate those data.

    LearnHub Activities

  • Or, you could create an Array of length 5 and store the values in it (via the wrapper classes) and this would be your "struct".

    AutoHotkey Community

  • I guess it would be considered a generic 'struct'?

    AutoHotkey Community

  • Also, remember that a "struct" is nothing but a Class with no functions.

    AutoHotkey Community

  • "struct" would still be called a "class", but you can have it behave like a struct by defining no class functions (apart from the getters/setters, and the "required" functions (e.g. new, initClass, destroy)).

    AutoHotkey Community


Log in or sign up to get involved in the conversation. It's quick and easy.