C语言学习课件第十一章.ppt

C语言学习课件第十一章概要1

Outline Key Points 10.1 Introduction Why need “Structure”? So far, we’d discussed two kinds of data: Simple: char, int, long, double, etc. Scalar: array, pointer, etc. It’s inconvenient in some applications: See next slides for an example 10.1 Introduction We want to represent time as year/month/date: int f (){ int year1, year2, month, date; year1 = 2050; year2 = 2020; month = 12; date = 30; date++; /*Should we increase year1 or year2?*/ } The problem is that there is no logical connection between them

文档评论(0)

1亿VIP精品文档

相关文档