Skip to content

This is a self-study guide for learning C++. The project is suitable for those who had experienc in C, basic understanding of Data Structures, and Assembly Language.

Notifications You must be signed in to change notification settings

KingArthur0205/CPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Study Guide for C/C++

My self-study guide on learning CPP
All of the notes are color-coded. Each color stands for a different meaning.

  • Blue: Definitions
  • Orange: Title of A New Concept
  • Yellow: Operations/Important Ideas
  • Red: Warning
  • Purple: Things to be Noted
  • Pink: Title of a Minor Concept

Chapter1: Introduction

  1. Input/Output Stream
  2. Comments & Compilation Errors

Chapter2: Varaibles and Basic Types

  1. Primitive Built-in Types
      1. Primitive Built-in Types
  2. Variables
      1.Variables
  3. Compound Types
      1. Identifiers&Reference   2. Pointers
  4. Const Quantifier
      1. Const Quantifier   2. Const Continue   3. Const Cotinue(2)
  5. Deal with Types
      1. Type Alias&Keyword auto   2. Keyword Decltype
  6. Define Our Own Data Structure
      1. Struct Data Type&Preprocessor

Chapter3: Strings, Vectors, and Arrays

  1. Namespace using Declarators
      1. Namespace using Declarators
  2. Library String Type
      1. Defining and Initialzing Strings   2. String Operations   3. For Each Loop   4. Subscript and Iteration
  3. Library Vector Type
      1. Intro to Vector   2. Vector Operations
  4. Iterators
      1. Intro to Iterators   2. Using Iterators   3. Iterator Arithmetic
  5. Arrays
      1. Define an Array&Access Elements in an Array   2. C-Style String   3. Multidimensional Arrays

Chapter4: Expressions

  1. Fundamentals
      1. Associativity&Precedence
  2. Arithmetic Operators
      1. Arithmetic Operators
  3. Logical and Relational Operator
  4. Assignment Operator
  5. Increment and Decrement Operator
  6. The Member Access Operator
  7. The Conditional Operator
  8. Sizeof Operator
  9. Type Conversion
      1. The arithmetic Conversion   2. Explicit Type Conversion

Chapter5: Statements

  1. Simple Statements
  2. Iterative Statements
  3. Jump Statement
  4. Exception Handling

Chapter6: Functions

  1. Function Basics
  2. Argument Passing
      1. Pass Arguments by Value&Reference   2. Const Parameter   3. Pass Array to A Function   4. Functions with Varying Parameters
  3. Return Types and Return Statements
  4. Overloaded Functions
  5. Features for Specialized Uses
      1. Default Arguments   2. Inline and Constexpr Functions
  6. Function Matching
  7. Function Pointer

Chapter7: Classes

  1. Defining Abstract Data Types
      1. Define struct Class&Keyword this   2. Define Member Function   3. Define Nonmember Function   4. Constructors
  2. Encapsulation
  3. Additional Class Features
      1. Define In-Class Type, Inline Functions, Overloading Functions, and Mutable Members   2. Return *this   3. Class Type and Friendship Revisit
  4. Class Scope
  5. Constructor Revisited
      1. Constructor Initializer   2. Delegating Constructor and Default Constructor   3. Implicit Class-Type Conversion
  6. Static Class Member

Chpapter8: The IO Library

  1. The IO Class
      1. Condition States   2. Manage the Output Buffer
  2. File Input and Output
      1. Using ifstream and ofstream by inheritance   2. File Mode
  3. String Streams

Chapter9: Sequential Containers

  1. Overview of The Sequential Containers
  2. Container Library Overview
      1. Iterators   2. Container Type, begin() and end(), and Container Initialization   3. assign and swap   4. Container Size Operation and Container Comparison
  3. Sequential Container Operations
      1. Element Insertion   2. Access and Erase Elements   3. Specialized forward_list Operations   4. Potential Invalid Iterator after Insertion or Addition
  4. Vector/String Members: reserve, shrink_to_fit, capacity
  5. Additional String Operations
      1. Overloaded insert and erase&append and replace   2. String find, compare, and to numeric value
  6. Adaptors

Chapter10: Generic Algorithms

  1. Overview: How the algorithms work?
  2. A First Look At the Algorithms
      1. Read-only Algorithms   2. Algorithms that Write Containers   3. Algorithms that Reorder the Container
  3. Customizing Operations
      1. Passing Predicates and Lambda Expression   2. Capture Variable by Reference/Value, Implicit Capture, and Mutable Lambda   3. Binding Arguments
  4. Revisiting Iterator
      1. Insert Iterator&IO iterator   2. Reverse Iterator   3. Iterator Categories   4. Algorithm Parameter and Naming Patterns&Special Members for List

Chapter11 Associative Container

  1. Using map and set
  2. Overview of Associative Container
      1. Initialization&Requirements on Element Type   2. The Pair Type
  3. Associative Container Operations
      1. Iterator&Adding Elements   2. Erasing&Accessing Elements   3. lower_bound, uppoer_bound&equal_range   4. Practice: Word Transformation Program
  4. Unordered Associative Container

Chapter12: Dynamic Memory

  1. Dynamic Memory and Smart Pointers
      1. Allocate Dynamic Memory and Intro to Smart Pointers   2. Automatic Memory Free&Dynamic Class   3. Manage Memory Directly using new and delete   4. Smart Pointers&Built-in Pointers   5. Smart Pointer and Exceptions   6. unique_ptr   7. weak_ptr
  2. Dynamic Array
      1. new Arrays   2. Destroy Dynamic Arrays&Intro to allocator

Chapter13 Copy Control

  1. Copy, Assign, and Destroy
      1. Copy Constructor   2. Copy Assignment Operator and Destructor   3. Define copy with destructors, indicate synthesized with =default, and =delete   4. Private Copy Control
  2. Copy Control and Resource Management: Valuelike and Pointerlike Class
  3. Swap
  4. Example: Folder and Message
  5. Class That Manage Resources: StrVec
  6. Moving Objects
      1. Rvalue Reference   2. Move Constructor and Move-Assignment Operator

Chapter 14 Overloaded Operators and Conversions

  1. Intro to Overloaded Operators
  2. Overload the Input and Output Operators
  3. Overloaded Arithmetic, Relational, and Assignment Operator
  4. Overloaded Subscript, Decrement, and Increment Operator
  5. Function Call Operators
     1. Overloaded Member Access and Function Call Operator   2. Lambdas are Function Objects   3. Library Defined Function Objects

Chapter 15 OOP

  1. Intro to Inheritance
  2. Define Base and Derived Classes
      1. Define Base Class and Derived-to-Base Conversion   2. Derived Class Constructor, Member Using, Static Member, Inheritance Preventing, and Declaration   3. Conversion between Base and Derived Class
  3. Override Virtual Functions
  4. Abstract Base Class
  5. Access Control and Inheritance
      1. Access to Members and Derived-to-Base Conversion   2. Friendship in Inheritance, Exempt Individual Members, and Default Protection
  6. Class Scope under Inheritence
  7. Constructors and Copy Control
      1. Virtual Constructor and Synthesized copy, control   2. Derived Class Copy Constructor   3. Inherited Constructor

Chapter 16 Template and Generic Programming

  1. Defining a Template
      1. Function Templates   2. Class Template   3. Definition of Blob   4. Template Friendship
  2. Overloading and Templates
  3. Variadic Template
  4. Specialized Template

Chapter 17 Specialized Library Facilities

  1. The tuple Type
      1. Defining and Initializing tuples

The C Programming Language

Chapter 6 Struct

  1. Basics of struct and Operations of struct
  2. Array of Structures
  3. Self-Referential Struct: Binary Tree
  4. Typedef and Struct
  5. Bit-fields

Chapter 7 Input and Output

  1. getchar and putchar
  2. printf
  3. Variable-length Argument List and scanf
  4. File Access
  5. Error Handling
  6. Line Input and Output
  7. Miscellaneous Functions

Chapter 8 The UNIX Interface

  1. File Descriptor&Low-level Read and Write
  2. Open, Creat, Close, Unlink
  3. Lseek and stdio.h

Effective C++

Chapter 1: Accustoming to C++

  1. Item 2: Prefer const, enums, and inlines to #define
  2. Item 3: Use const Whenever Possible
  3. Item 4: Make sure objects are initialized before they are used

Chapter 2: Constructors, Destructors, and Assignment Operators

  1. Item 5: Know what functions C++ silently writes and calls
  2. Item 6: Explicitly disallow the use of copmiler-generated functions we do not want
  3. Item 7: Declare destructors virtual in polymorphic base classes
  4. Item 9: Don't call virtual functions in constructors or destructors
  5. Item 10: Have assignment operators return a reference to *this
  6. Item 11: Handle assignment to self in operator=
  7. Item 12: Copy all parts of an object

Chapter 3: Resource Management

  1. Use Objects to Manage Resource: auto_ptr and shared_ptr

About

This is a self-study guide for learning C++. The project is suitable for those who had experienc in C, basic understanding of Data Structures, and Assembly Language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published