|
 |  C++ Program Design, 3/e James P. Cohoon,
University of Virginia Jack W. Davidson,
University of Virginia
Modifying objects
Chapter 3 OverviewIn this chapter, we introduce operators that can modify objects and the use of programmer-defined object types. The operators are the assignment operators and the extraction operator. Of particular importance is =, the assignment operator. The assignment operation is common to most programming languages, and understanding the concept of assignment and its implementation in a language is a key concept that all programmers must master. The extraction operator >> modifies an object by extracting a value from a stream and storing that value in an object. The chapter concludes by introducing two programmer-defined object types: SimpleWindow and RectangleShape. We show how to define and manipulate instances of these programmer-defined object types by writing programs that produce graphical displays. |
|
|