比思論壇

標題: C++ By Example(四) Structures and File Input Output (Greg Perry英文版) [打印本頁]

作者: lcj1985316    時間: 2016-5-6 19:00
標題: C++ By Example(四) Structures and File Input Output (Greg Perry英文版)
Using structures, you have the ability to group data and work with the grouped data as a whole. Business data processing uses the concept of structures in almost every program. Being able to manipulate several variables as a single group makes your programs easier to manage. This chapter introduces the following concepts: ♦ Structure definitions ♦ Initializing structures ♦ The dot operator (. ) ♦ Structure assignment ♦ Nested structures This chapter is one of the last in the book to present new concepts. The remainder of the book builds on the structure concepts you learn in this chapter.
A structure is a collection of one or more variable types. As you know, each element in an array must be the same data type, and you must refer to the entire array by its name. Each element (called a member) in a structure can be a different data type.

Suppose you wanted to keep track of your CD music collection.You might want to track the following pieces of information about
each CD:
Title
Artist
Number of songs
Cost
Date purchased
There would be five members in this CD structure.


下载地址:

http://edu.ctfile.com/info/pjw62398

http://www.yimuhe.com/file-3046463.html



作者: 蒼之濤    時間: 2016-5-6 19:25
我见到编程就头疼




歡迎光臨 比思論壇 (http://108.170.5.74:8080/) Powered by Discuz! X2.5