Explore introductory C++ language programming with simple language and up-to-date code examples.
Overview
Syllabus
Introduction
- Get up and running with C++
- What you should know
- Using the exercise files on GitHub
- Elements of object-oriented programming
- Creating a simple program in C++
- Challenge: Console interaction
- Solution: Console interaction
- Basic data types
- Variables
- Using variables
- Expressions, assignments, and operations
- Type inference with auto
- Preprocessor directives
- Constants
- Arrays
- Strings
- Type casting
- Type casting examples
- Enumerations
- Challenge: Calculate an average
- Solution: Calculate an average
- Structures
- Classes
- Using classes
- Header and implementation files
- Using several source files
- Pointers
- Using objects with pointers
- References
- Vectors
- Using objects with vectors
- Challenge: Create some classes
- Solution: Create some classes
- If statements
- Switch statements
- While loops
- For loops
- Challenge: Calculate GPA from a vector
- Solution: Calculate GPA from a vector
- Creating functions
- Function parameters
- Using functions
- Challenge: Create a report card function
- Solution: Create a report card function
- Opening a text file for reading
- Open a text file for writing
- Challenge: Upgrade to work with files
- Solution: Upgrade to work with files
- Next steps
Taught by
Peggy Fisher