1 / 54

C Programming: Program Design Including Data Structures, Third Edition

Objectives. In this chapter you will:Learn how to create and manipulate your own simple data type

verena
Download Presentation

C Programming: Program Design Including Data Structures, Third Edition

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. C++ Programming: Program Design Including Data Structures, Third Edition Chapter 8: User-Defined Simple Data Types, Namespaces, and the string Type

    2. Objectives In this chapter you will: Learn how to create and manipulate your own simple data type—called the enumeration type Become aware of the typedef statement Learn about the namespace mechanism Explore the string data type, and learn how to use the various string functions to manipulate strings

    3. Enumeration Type Data type - a set of values together with a set of operations on those values To define a new simple data type, called enumeration type, we need three things: A name for the data type A set of values for the data type A set of operations on the values

    4. Enumeration Type (continued) A new simple data type can be defined by specifying its name and the values, but not the operations The values must be identifiers

    5. Enumeration Type (continued) The syntax for enumeration type is: value1, value2, … are identifiers called enumerators value1 < value2 < value3 <...

More Related