About this Book
Most of the contents in this book are included in the contents of my previous book published in 2016, "C++ Programming from Conceptions to Applications". However, some conceptions, examples, figures, and practice problems have been added. The core contents of this book made up of practical experiences in industry research institutes and a lot of know-how gained from the experiences of university's long lectures.
I have joined in system program development projects, Optical Disk Driver (ODD), with C++ at research and development center in Hyundai Electronics Co., Ltd. (now SK Hynix Inc.) for many years since 1991, and have a background in lecturing C and C++ language in a university for decades. Based on these experiences, the ultimate goal of writing this book is intended to help the readers accurately understand the core contents of C++, can independently design, and apply it in the industry. All the example programs that are coded in this book followed the ANSI/ISO C++11/14/17 International Standard, and also they are verified from the Visual Studio 2010TM of Microsoft. The main features of this book are shown below.
∙All concepts, example codes, and operations of the program are clearly explained with many intuitive codes, pictures, and to-the-point explanations so that they can be easily understood and applied.
∙In order to easily understand C++ codes, all chapters are composed of 'To Use', 'To Summarize', 'To Analyze', and 'Tip' so that the important concepts can be accurately understood and applied.
∙Also, core contents that are learned in each chapter are summarized in the summary and are included to solve in the practice problems.
∙And, 222 pictures, 275 examples, and 317 exercises are included to easily understand codes, and they can be applied to the application program design.
CHAPTER 01. Introduction to C++
1.1 Overview
1.2 C++ Programs
1.3 C++ Application Program Development
1.4 Starting C++ Programs
1.5 g++ Compilation
CHAPTER 02. Input and Output Objects
2.1 Overview
2.2 Input and Output Objects of C++
2.3 cin.get(), cin.getline() and cin.ignore()
2.4 Precision of the Real Number Type
CHAPTER 03. Basics of C++
3.1 Overview
3.2 Reserved Words
3.3 Data Types
3.4 namespace
3.5 References
3.6 Calling C Codes in C++
CHAPTER 04. Operators
4.1 Overview
4.2 Operator
4.3 Types of Operator
4.4 Arithmetic Operators
4.5 Increment and Decrement Operators
4.6 Relation Operators, Logical Operators and Equivalence Operators
4.7 Bitwise Operators
4.8 Ternary Operators
4.9 Compound Assignment Operators
4.10 Other Operators
CHAPTER 05. Control Statements
5.1 Overview
5.2 if Control Statements
5.3 switch Control Statements
5.4 for, while and do-while Control Statements
5.5 goto Control Statements
5.6 break Control Statements
5.7 continue Control Statements
CHAPTER 06. Function
6.1 Overview
6.2 Definition of Function
6.3 Function Call
6.4 Returning a Value from a Function
6.5 Preprocessors
6.6 Division of Source Code
6.7 Storage Class
6.8 Variable Argument Functions
6.9 inline Functions
6.10 Recursive Functions
6.11 System Functions
CHAPTER 07. Arrays
7.1 Overview
7.2 One-Dimensional Arrays
7.3 Two-Dimensional Arrays
7.4 Three-Dimensional Arrays
CHAPTER 08. Introduction to Pointers
8.1 Overview
8.2 Pointers
8.3 Declaration and Use of Pointers
8.4 Operation of Pointers
CHAPTER 09. Arrays and Pointers
9.1 Overview
9.2 Arrays and Pointers
9.3 Pointer Arrays
9.4 Pointers for Arrays
9.5 Multiple Pointers
9.6 Access of Cell Arrays Using Pointers
CHAPTER 10. Process of Strings Using Pointers
10.1 Overview
10.2 Characters and Strings
10.3 Character Processing Functions
10.4 String Processing Functions
CHAPTER 11. Application of Pointers
11.1 Overview
11.2 Memory Allocation
11.3 NULL pointers and Type void pointers
11.4 Using const in Pointers
CHAPTER 12. Application of Functions
12.1 Overview
12.2 Delivering Arguments of Functions
12.3 Return of Function Value with Structure
12.4 Pointer to Function
CHAPTER 13. Classes
13.1 Overview
13.2 Defining a class
13.3 Access Specifiers of a class
13.4 class Member Functions
13.5 Object Construction and Member Function Call
13.6 friend Functions and friend Classes
13.7 Separation of Files
CHAPTER 14. Constructors and Destructors
14.1 Overview
14.2 Constructors
14.3 Destructors
14.4 Copy Constructors
CHAPTER 15. static and const in classes
15.1 Overview
15.2 Using static
15.3 Using static in Classes
15.4 Using const in Classes
15.5 explicit and mutable
CHAPTER 16. Inheritance
16.1 Overview
16.2 Base Classes and Derived Classes
16.3 Three Types of Class Inheritance
16.4 Conditions of Class Inheritance
16.5 Memory Alignment in Classes
16.6 Initializers
16.7 friend Functions when class is in Relationship of Inheritance
CHAPTER 17. Inheritance, virtual Function, and Polymorphism
17.1 Overview
17.2 Rules of Class Type Conversion
17.3 Binding of the Member Function
17.4 virtual Functions and Polymorphism
17.5 virtual Function Tables
17.6 Pure virtual Functions and Abstract Base Classes
17.7 virtual Destructors
17.8 Composition, Multiple Inheritance, and virtual Inheritance of Classes
CHAPTER 18. Casting in C++
18.1 Overview
18.2 RTTI (Run-Time Type Information)
18.3 Casting in C++
18.4 Casting of Classes
CHAPTER 19. Operator Overloading
19.1 Overview
19.2 *this
19.3 Operator Overloading
19.4 + Operator Overloading
19.5 ++, -- Operator Overloading
19.6 = Operator Overloading
19.7 [ ] Operator Overloading
19.8 ( ) Operator Overloading
19.9 Data Type Overloading
19.10 <<, >> Operator Overloading
19.11 new, delete Operator Overloading
19.12 *, -> Operator Overloading
19.13 Smart Pointer
CHAPTER 20. string Class
20.1 Overview
20.2 String Processing
20.3 Processing Strings Using the string Class
CHAPTER 21. Input and Output of Files
21.1 Overview
21.2 C File System
21.3 C++ File System
CHAPTER 22. Exception Processing
22.1 Overview
22.2 C Style Exception Processing
22.3 C++ Style Exception Processing
22.4 Exception Processing Class
CHAPTER 23. Templates
23.1 Overview
23.2 Function Templates
23.3 Class Templates
CHAPTER 24. STL(Standard Template Library)
24.1 Overview
24.2 Sequence Container
24.3 Associative Containers
24.4 iterator
24.5 algorithm
24.6 Function Objects
24.7 Container Adapter
24.8 allocator