Definitions

from Wiktionary, Creative Commons Attribution/Share-Alike License.

  • noun computing, programming 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.

Etymologies

from Wiktionary, Creative Commons Attribution/Share-Alike License

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

Support

Help support Wordnik (and make this page ad-free) by adopting the word struct.

Examples

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

    LinuxQuestions.org grail 2010

  • 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 2009

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

    LXer Linux News 2008

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

    Technology Snake Oil Neal Ford 2005

  • 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 rkp728 2010

  • 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 rkp728 2010

  • 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 2010

  • 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 2009

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

    AutoHotkey Community 2009

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

    AutoHotkey Community 2009

Comments

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