|
struct
Syntax:
struct struct-name : inheritance-list {
public-members-list;
protected:
protected-members-list;
private:
private-members-list;
} object-list;
Structs are like `classes`, except that by default members of a struct are public rather than private. In C, structs can only contain data and are not permitted to have inheritance lists. For example:
struct Date {
int Day;
int Month;
int Year;
};
|