Struct: Difference between revisions
Jump to navigation
Jump to search
m (linked the german translation) |
Thunder4ik (talk | contribs) m (→top: Unicodifying, added underlinked tag) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{Underlinked|date=January 2024}} | ||
| | {{lowercase}} | ||
}} | |||
A '''struct''' is identical to a [[:Category:Classes|class]], except that its members are public by default. It exists in C++ largely for the purpose of backwards compatibility with C. | A '''struct''' is identical to a [[:Category:Classes|class]], except that its members are public by default. It exists in C++ largely for the purpose of backwards compatibility with C. | ||
Valve typically use structs to pass conceptual groups of variables between functions. This is advantageous because a struct (or a indeed class - there is little between the two) can be extended or modified later without breaking the existing calls or declarations of any code that uses it. | Valve typically use structs to pass conceptual groups of variables between functions. This is advantageous because a struct (or a indeed class - there is little between the two) can be extended or modified later without breaking the existing calls or declarations of any code that uses it. | ||
==See also== | |||
{{w|struct (C programming language)}} | |||
[[Category:Programming]] | [[Category:Programming]] | ||
[[Category:Glossary]] | [[Category:Glossary]] |
Latest revision as of 15:06, 7 January 2024

This article needs more
links to other articles to help
integrate it into the encyclopedia. Please help improve this article by adding links
that are relevant to the context within the existing text.
January 2024



January 2024
A struct is identical to a class, except that its members are public by default. It exists in C++ largely for the purpose of backwards compatibility with C.
Valve typically use structs to pass conceptual groups of variables between functions. This is advantageous because a struct (or a indeed class - there is little between the two) can be extended or modified later without breaking the existing calls or declarations of any code that uses it.