- Overview
- Prerequisites
- Audience
- Audience
- Curriculum
Short Description:
C++ is a general-purpose programming language created by Bjarne Stroustrup. It is one of the most popular programming languages, used for creating high performance applications across variety of domains and platforms.
Description:
Unlock the power of C++, a versatile and high-performance programming language crafted by Bjarne Stroustrup. C++ remains a cornerstone of software development, with an enduring legacy spanning over 30 years. It underpins popular operating systems like Windows, Linux, and Mac OS, making it a go-to choice for software creation. In our 'Modern C++ Training' course, we delve into C++14, C++17, and C++20, the contemporary versions of C++. Explore a spectrum of features, including variables, loops, functions, classes, and objects. Equip yourself with the skills to harness C++ for developing high-performance applications across diverse domains and platforms.
Course Code/Duration:
BDT255 / 4 to 5 – Days
Learning Objectives:
Upon completing this course, you will:
- Master C++ fundamentals.
- Explore modern C++ versions (C++14, C++17, C++20).
- Write high-performance applications.
- Understand C++'s historical importance and continued relevance.
- Choose the right programming paradigm (procedural or object-oriented).
- Build a strong C++ foundation for diverse projects.
- Understanding of how computers work
- One or more years technical experience
- Basic programming knowledge in any computer language (a must)
- Candidates who want to learn and implement applications using modern C++.
- Candidates who want to learn and implement applications using modern C++.
Course Outline:
C++ Programming Fundamentals
Structure of C++ Program
- Preprocessor directive
- Comments in C++ code
- Function: main()
- Using cin and cout
- First C++ program
Variables and Constants
- Declaring and Initializing variables
- Built-in C++ primitive types
- Size of variables
- Defining constants
Arrays and Vectors
- Declaring and initializing Arrays
- Accessing and modifying array elements
- Multi-dimensional arrays
- Declaring and initializing Vectors
- Accessing and modifying vector elements
Statement and Operators
- Expression and statements
- Assignment operators
- Arithmetic operators
- Relational operators
- Logical operators
- Operator precedence
Controlling Program Flow
- If statement
- If else statements
- Nested if statements
- Szitch-case statement
- Conditional operator
- For loop
- Range-based for loop
- While loop
- Do while loop
- Continue and break
- Nested loops
Characters and Strings
- Character functions
- C-style strings
- Working with C-style strings
- C++ strings
- Working with C++ strings
Functions
- What is a function?
- Function definition
- Function prototype
- Function parameters and return statement
- Default argument values
- Overloading functions
- Passing arrays to functions
- Pass by reference
- Scope rules
- How do function calls work?
- Inline functions
- Recursive functions
Pointers and References
- What is a pointer?
- Declaring pointers
- Accessing the pointer address and storing address in a pointer
- Dereferencing a pointer
- Dynamic memory allocation
- Arrays and pointers relationship
- Pointer arithmetic
- Const and pointers
- Passing pointers to functions
- Potential pointer pitfalls
- What is a reference?
- L-values and R-values
OOP – Classes and Objects
- What is Object Oriented Programming?
- What are classes and objects?
- Declaring a class and creating objects
- Access class members
- Public and private members
- Implementing member methods
- Constructors and Destructors
- Overloading constructors
- Constructor initialization lists
- Delegating Constructors
- Constructor parameters and default values
- Copy Constructor
- Shallow copying with copy constructor
- Deep copying with copy constructor
- Move Constructors
- The ‘this’ pointer
- Using const with classes
- Static class members
- Structs v/s classes
- Friends of a class
Operator Overloading
- What is operator overloading?
- Overloading the assignment operator (copy)
- Overloading the assignment operator (move)
- Overloading operators as member functions
- Overloading operators as global functions
- Overloading the stream insertion and extraction operators
Inheritance
- What is inheritance?
- Terminology and notation
- Inheritance v/s Composition
- Deriving classes from existing classes
- Protected members and class access
- Constructors and Destructors
- Passing arguments to base class constructors
- Copy/move constructors and operator = with derived classes
- Redefining base class methods
- Multiple inheritance
Polymorphism
- What is polymorphism?
- Using a base class pointer
- Virtual functions
- Virtual destructors
- Using the override specifier
- Using the final specifier
- Using base class references
- Pure virtual functions and abstract classes
Smart Pointers
- Some issues with raw pointers
- What is a smart pointer? Ownership and RAll
- Unique pointers
- Shared pointers
- Weak pointers
- Custom deletes
Exception Handling in C++
- Basic concepts and simple example: Divide by zero
- Throwing an exception from a function
- Handling multiple exceptions
- Stack unwinding and how it works
- Creating user-defined exception classes
- Class level exceptions
- The C++ std::exception class hierarchy
I/O and Streams
- Files, streams and I/O
- Stream manipulators
- Stream manipulators: boolean
- Stream manipulators: integers
- Stream manipulators: floats
- Stream manipulators: align and fill
- Reading from a text file
Standard Template Library (STL)
- What is STL?
- Generic programming with macros
- Generic programming with function templates
- Generic programming with class templates
- Creating a generic array template class
- Introduction to STL containers
- Introduction to STL iterators
- Introduction to STL algorithms
- Sequence container: Array
- Sequence container: Vector
- Sequence container: Deque
Lambda Expressions
- Motivation
- Structure of a lambda expression
- Stateless lambda expressions
- Stateful lambda expressions
- Lambdas and STL
All these sections will include code samples, exercises and quizzes
Training material provided: Yes (Digital format)
Hands-on Lab:
Instructions will be provided as prework for the course to C++ compiler for Windows,
macOS and Linux.