Defining Your Own Data Types
In this chapter, I’ll introduce one of the most fundamental tools in the C++ programmer’s toolbox: classes. I’ll also present some ideas that are implicit in object-oriented programming and show how these are applied.
In this chapter you’ll learn:
- What the basic principles in objected-oriented programming are
- How you define a new data type as a class, and how you can create and use objects of a class type
- What class constructors are, and how you define them
- What the default constructor is, and how you can supply your own version
- What the default copy constructor is
- What a friend function is
- What privileges ...