Learn C++ programming, starting with the basics. Explore C++ syntax, operators, loops, functions, data structures, classes, templates, and more.
Overview
Syllabus
Introduction
- Learn C++
- Using the exercise files
- What is C++?
- The structure of this course
- The C++ toolchain
- Using Xcode with the exercises
- Using Visual Studio with the exercises
- Introduction to basic syntax
- Anatomy of a C++ program
- Statements and expressions
- Identifiers
- Defining variables
- Pointers
- References
- Primitive arrays
- Primitive strings
- Conditionals
- The branching conditional
- Looping with while and do
- Iterating with for
- Range-based for loop
- Structures
- Functions
- Classes
- Using stdout
- Challenge: Count elements
- Solution: Count elements
- Overview of data types
- Integer types
- Integer sizes
- Fixed-size integers
- Floating-point types
- Characters and strings
- Character escape sequences
- Qualifiers
- References
- Structured data
- Bit fields
- Enumerations
- Unions
- Defining types with typedef
- The void type
- The auto type
- Unambiguous null pointer constant
- Challenge: A library card data structure
- Solution: A library card data structure
- Common operators
- Compound assignment operators
- Increment and decrement operators
- Comparison (relational) operators
- Logical operators
- Bitwise operators
- Ternary conditional operator
- Dynamic memory operators
- Type cast
- Using sizeof
- Using typeid
- Operator precedence
- Challenge: Prime numbers
- Solution: Prime numbers
- Overview of C++ functions
- Creating a function
- Passing values to a function
- Using automatic and static variables
- Returning values from a function
- Using function pointers
- Overloading function names
- Defining a variable number of arguments
- Using recursion
- Challenge: Non-recursive factorial
- Solution: Non-recursive factorial
- Overview of classes and objects
- Defining a class
- Data members
- Function members
- Constructors and destructors
- Overloading operators
- Overloading operators with functions
- Challenge: Non-member operators
- Solution: Non-member operators
- Understanding templates
- Template functions
- Template classes
- Challenge: Template factorial
- Solution: Template factorial
- Overview of the Standard Library
- File I/O
- Binary files
- File management
- Unformatted character I/O
- Formatted character I/O
- Working with integers and real numbers
- String functions
- Handling system errors
- Challenge: Transform a file
- Solution: Transform a file
- Overview of the STL
- Vectors
- Strings
- I/O streams
- Handling exceptions
- Challenge: Transform a file (STL)
- Solution: Transform a file (STL)
- Challenge: Requirements
- Demonstration of the project
- Solution: A deck of cards
- Thank you
Taught by
Bill Weinman