Chapter 10: Data Structures and Classes


Overview

This chapter builds upon the content from previous chapters, specifically variables, pointers, and functions. Up to this point, we have used single variables to hold numbers, characters, and Booleans, which worked well because our sample programs were never intended to be anything but sample material to simply practice and learn from. However, as programs are put to the test and used to develop large-scale products, the haphazard storage of variables makes our work confusing and overwhelming. Consequently, the need to manage, organize, process, and store data in a predictable and understandable way becomes fundamental. In this chapter we explore the arrangement and collection of data and the principles of object-oriented programming. In short, data structures and classes are examined. The former is a collection of data, and the latter is an extension of this idea. In this chapter, the following subjects are discussed:

  • Data structures

  • struct keyword

  • Object orientation

  • Classes

  • Properties, methods, and access

  • Virtual functions

  • Polymorphism




Introduction to Game Programming with C++
Introduction to Game Programming with C++ (Wordware Game Developers Library)
ISBN: 1598220322
EAN: 2147483647
Year: 2007
Pages: 225
Authors: Alan Thorn

Similar book on Amazon
Beginning C++ Through Game Programming
Beginning C++ Through Game Programming
Beginning Game Programming
Beginning Game Programming
The Ultimate Guide to Video Game Writing and Design
The Ultimate Guide to Video Game Writing and Design

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net