[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
CppStruct
Keyword enabling you to create a structure.
In C, a struct can only contain (public) variables.
In C++ the only difference between a class and a struct is that the member variables of a struct are public by default, whereas for class these are private.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
CppStruct
(C++) struct
Syntax struct [struct_name] { [type] [member variable identifier]; }; Example struct Point { double mX; double mY; double mZ; };
Keyword enabling you to create a structure.
In C, a struct can only contain (public) variables.
In C++ the only difference between a class and a struct is that the member variables of a struct are public by default, whereas for class these are private.
'struct' links
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
