lect10_Struct

lect10_Struct - Compound Data Compound Data - Struct...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Compound Data -- Struct SIS1117 Computer Programming CS S Co pute og a g 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ontents Contents ompound data Compound data struct ember ariables Member variables Initialization of structure variables perators r compound data Operators for compound data Array of structure variables Passing compound data as arguments c1117 lecture 9 2
Background image of page 2
ompound data Compound data he ariables e e seen so far that captures The variables we ve seen so far that captures information mainly related to a single piece of formation information . int , char , bool , double , string n rray used to store a set of data of the An array is used to store a set of data of the same type . However, sometimes it is useful to have a collection of values of varies types and to treat them as a single information . Representing 2D points with x and y coordinates. c1117 lecture 9 3 Representing student records , with name , age , sex , etc.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ser- efine type User define type C++, it provides a data structure truct r In C++, it provides a data structure struct for storing this kind of compound data . e can define our own data- pe by using truct We can define our own data type by using struct .
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 05/04/2011.

Page1 / 12

lect10_Struct - Compound Data Compound Data - Struct...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online