| <<< Problems with procedural approach | Index | Fundamental properties of built-in types >>> |
int main()
{
Date birthday;
birthday.month = 3;
birthday.day = 8;
birthday.year = 2010;
std::cout << birthday << '\n';
}
Benefits: all logic is done around a single variable named birthday.
Questions:
What is Date?
What is birthday.month?
What happens here: std::cout << birthday?
| <<< Problems with procedural approach | Index | Fundamental properties of built-in types >>> |