Learn today. Build your future with AIFA Infotech. Need help? Contact Us
๐Ÿš€ AIFA INFOTECH ยท C++ DEVELOPMENT TRACK

Think in Objects.
Build in 3D.

Learn C++ from the first program to object-oriented programming, inheritance, polymorphism, templates, STL and practical projects. Every chapter includes key topics, sample code and a task to practise.

25Chapters
3Learning levels
6+Project ideas
class StudentOOP ยท STLstd::coutCompile โœ“
C++
{ }
OOP
</>
++
STL
Why learn with AIFA?

From syntax to software design

Build strong fundamentals, understand object-oriented concepts and use modern C++ tools through hands-on practice.

๐Ÿง 

Problem-solving skills

Practise conditions, loops, arrays and algorithms with clear examples.

๐Ÿงฑ

Object-oriented design

Learn classes, encapsulation, inheritance and polymorphism step by step.

โš™๏ธ

Modern C++ tools

Explore STL containers, algorithms, file streams and smart pointers.

Complete course syllabus

All C++ Programming Chapters

Open any chapter for the syllabus, sample code and practice task. Search topics and mark chapters complete to track your progress during this visit.

0 chapters completed0%
01Introduction to C++Understand C++, its evolution, applications and how it differs from C.Beginner30 minโŒ„

What you will learn

  • What is C++?
  • C and C++ overview
  • C++ applications
  • Compiler and IDE
  • Write, compile and run a program
Example code ยท C++
#include <iostream>
using namespace std;

int main() {
    cout << "Hello, AIFA!" << endl;
    return 0;
}
โœ๏ธ PRACTICE TASK

Print your name, course and city on separate lines.

02Setting Up the C++ EnvironmentSet up a compiler and learn the basic build-and-run workflow.Beginner25 minโŒ„

What you will learn

  • GCC / G++ compiler
  • Code editors and IDEs
  • Source files and executables
  • Compile using g++
  • Understand compiler errors
Example code ยท C++
g++ main.cpp -o main
./main
โœ๏ธ PRACTICE TASK

Create main.cpp, compile it and run the program. On Windows, run main.exe.

03Structure of a C++ ProgramLearn headers, main(), statements, namespaces and comments.Beginner35 minโŒ„

What you will learn

  • #include <iostream>
  • main() function
  • std namespace
  • Statements and semicolons
  • Single-line and multi-line comments
Example code ยท C++
#include <iostream>

int main() {
    std::cout << "Learning C++!\n";
    return 0;
}
โœ๏ธ PRACTICE TASK

Add comments and print two different messages.

04Variables, Constants and Data TypesStore values using appropriate C++ data types.Beginner45 minโŒ„

What you will learn

  • int, float, double and char
  • bool and string
  • Variable initialization
  • const and constexpr basics
  • Type conversion and auto
Example code ยท C++
#include <iostream>
#include <string>
int main() {
    int age = 20;
    double marks = 86.5;
    std::string name = "AIFA";
    std::cout << name << ", " << age << ", " << marks << '\n';
}
โœ๏ธ PRACTICE TASK

Create variables for a student name, roll number, percentage and grade.

05Input and OutputRead input with cin and display output with cout.Beginner40 minโŒ„

What you will learn

  • cout and insertion operator
  • cin and extraction operator
  • getline() for full lines
  • Formatting output
  • Basic input validation
Example code ยท C++
#include <iostream>
#include <string>
int main() {
    std::string name;
    std::cout << "Enter your name: ";
    std::getline(std::cin, name);
    std::cout << "Welcome, " << name << "!\n";
}
โœ๏ธ PRACTICE TASK

Ask the user for their name and age, then display both.

06Operators and ExpressionsPerform calculations and combine conditions with operators.Beginner45 minโŒ„

What you will learn

  • Arithmetic operators
  • Comparison operators
  • Logical operators
  • Assignment and increment/decrement
  • Precedence and type casting
Example code ยท C++
#include <iostream>
int main() {
    int a = 12, b = 5;
    std::cout << "Sum = " << a + b << '\n';
    std::cout << "Remainder = " << a % b << '\n';
    return 0;
}
โœ๏ธ PRACTICE TASK

Build a calculator for addition, subtraction, multiplication and division.

07Decision Making: if, else and switchControl program flow based on conditions.Beginner45 minโŒ„

What you will learn

  • if statement
  • if-else and else-if ladder
  • Nested conditions
  • switch statement
  • Conditional operator ?:
Example code ยท C++
#include <iostream>
int main() {
    int marks = 78;
    if (marks >= 80) std::cout << "Grade A\n";
    else if (marks >= 60) std::cout << "Grade B\n";
    else std::cout << "Keep practising\n";
    return 0;
}
โœ๏ธ PRACTICE TASK

Check whether a number is positive, negative or zero.

08Loops and IterationRepeat work using loops and avoid common loop mistakes.Beginner50 minโŒ„

What you will learn

  • for loop
  • while loop
  • do-while loop
  • break and continue
  • Nested loops and range-based for
Example code ยท C++
#include <iostream>
int main() {
    for (int i = 1; i <= 5; ++i) std::cout << i << ' ';
    std::cout << '\n';
    return 0;
}
โœ๏ธ PRACTICE TASK

Print the multiplication table of a number entered by the user.

09Patterns and Number ProblemsBuild problem-solving skills through common programming exercises.Beginner55 minโŒ„

What you will learn

  • Star and number patterns
  • Factorial
  • Prime number check
  • Reverse a number
  • Palindrome and digit sum
Example code ยท C++
#include <iostream>
int main() {
    for (int row = 1; row <= 4; ++row) {
        for (int col = 1; col <= row; ++col) std::cout << "* ";
        std::cout << '\n';
    }
    return 0;
}
โœ๏ธ PRACTICE TASK

Create a triangle pattern and a program to reverse an integer.

10Arrays and VectorsStore collections of values and learn when to use std::vector.Beginner55 minโŒ„

What you will learn

  • Array declaration and indexing
  • Iterating over arrays
  • std::vector basics
  • Sum, average, maximum and minimum
  • Bounds and safe access
Example code ยท C++
#include <iostream>
#include <vector>
int main() {
    std::vector<int> scores{72, 85, 91, 68};
    int total = 0;
    for (int score : scores) total += score;
    std::cout << "Total = " << total << '\n';
    return 0;
}
โœ๏ธ PRACTICE TASK

Read five numbers into a vector and calculate their average.

11StringsWork with text using std::string and common string operations.Beginner45 minโŒ„

What you will learn

  • std::string basics
  • Concatenation
  • Length and indexing
  • getline()
  • Searching and substring
Example code ยท C++
#include <iostream>
#include <string>
int main() {
    std::string name = "AIFA Infotech";
    std::cout << name << '\n';
    std::cout << "Length: " << name.size() << '\n';
    return 0;
}
โœ๏ธ PRACTICE TASK

Count the characters in a sentence and search for a chosen word.

12Functions and OverloadingWrite reusable functions and understand overload resolution.Intermediate55 minโŒ„

What you will learn

  • Function declaration and definition
  • Parameters and return values
  • Pass by value and reference
  • Default arguments
  • Function overloading
Example code ยท C++
#include <iostream>
int add(int a, int b) { return a + b; }
double add(double a, double b) { return a + b; }
int main() {
    std::cout << add(10, 20) << '\n';
    std::cout << add(1.5, 2.5) << '\n';
}
โœ๏ธ PRACTICE TASK

Create overloaded functions to calculate the area of a square and rectangle.

13Pointers, References and MemoryUnderstand pointers, references and safe memory access.Intermediate60 minโŒ„

What you will learn

  • Address-of and dereference operators
  • Pointer initialization
  • References and aliases
  • nullptr
  • Stack and heap concepts
Example code ยท C++
#include <iostream>
int main() {
    int value = 50;
    int* ptr = &value;
    int& ref = value;
    ref = 75;
    std::cout << *ptr << '\n';
    return 0;
}
โœ๏ธ PRACTICE TASK

Use a reference to update a value and a pointer to read it.

14Object-Oriented Programming BasicsModel data and behaviour using classes and objects.Intermediate60 minโŒ„

What you will learn

  • Classes and objects
  • Data members and member functions
  • Access specifiers
  • Constructors and destructors
  • this pointer basics
Example code ยท C++
#include <iostream>
#include <string>
class Student {
public:
    std::string name;
    void introduce() const { std::cout << "I am " << name << '\n'; }
};
int main() {
    Student s; s.name = "AIFA learner"; s.introduce();
}
โœ๏ธ PRACTICE TASK

Create a Book class with title, author and a display() method.

15Encapsulation, Constructors and Static MembersProtect class data and control object initialization.Intermediate50 minโŒ„

What you will learn

  • private and public members
  • Getters and setters
  • Constructor overloading
  • Initializer lists
  • Static data and member functions
Example code ยท C++
#include <iostream>
class Counter {
    int value;
public:
    Counter(int start) : value(start) {}
    void increment() { ++value; }
    int get() const { return value; }
};
int main() { Counter c(0); c.increment(); std::cout << c.get(); }
โœ๏ธ PRACTICE TASK

Create a BankAccount class with a private balance and safe deposit/withdraw methods.

16Inheritance and PolymorphismReuse class behaviour and understand runtime polymorphism.Intermediate60 minโŒ„

What you will learn

  • Base and derived classes
  • Public inheritance
  • Function overriding
  • virtual functions
  • Abstract classes and virtual destructors
Example code ยท C++
#include <iostream>
class Shape {
public:
    virtual double area() const = 0;
    virtual ~Shape() = default;
};
class Square : public Shape {
    double side;
public:
    explicit Square(double s) : side(s) {}
    double area() const override { return side * side; }
};
int main() { Square s(4); std::cout << s.area(); }
โœ๏ธ PRACTICE TASK

Create a base Shape class and derived Circle and Rectangle classes.

17Operator Overloading and Friend FunctionsMake user-defined types work naturally with selected operators.Intermediate45 minโŒ„

What you will learn

  • Operator overloading rules
  • Overload arithmetic operators
  • Stream insertion and extraction
  • friend functions
  • Avoid confusing overloads
Example code ยท C++
#include <iostream>
struct Point { int x, y; };
Point operator+(Point a, Point b) { return {a.x+b.x, a.y+b.y}; }
int main() { Point p = {2,3}, q = {4,5}; Point r = p + q; std::cout << r.x << ',' << r.y; }
โœ๏ธ PRACTICE TASK

Create a Complex number type and overload addition.

18Templates and Generic ProgrammingWrite reusable functions and classes for different data types.Advanced50 minโŒ„

What you will learn

  • Function templates
  • Class templates
  • Template parameters
  • Generic algorithms
  • Introduction to type deduction
Example code ยท C++
#include <iostream>
template <typename T>
T larger(T a, T b) { return a > b ? a : b; }
int main() { std::cout << larger(8, 12) << '\n'; std::cout << larger(2.5, 1.5); }
โœ๏ธ PRACTICE TASK

Write a template function that returns the smaller of two values.

19STL Containers and IteratorsUse the Standard Template Library to manage data efficiently.Advanced60 minโŒ„

What you will learn

  • vector, array and deque
  • list and forward_list overview
  • map, set and unordered_map overview
  • Iterators and range-based loops
  • Choosing suitable containers
Example code ยท C++
#include <iostream>
#include <map>
int main() {
    std::map<std::string, int> marks{{"Aman", 80}, {"Sara", 92}};
    for (const auto& item : marks)
        std::cout << item.first << ": " << item.second << '\n';
}
โœ๏ธ PRACTICE TASK

Store student names and scores in a map and display all records.

20STL Algorithms and LambdasSort, search and transform collections using standard algorithms.Advanced50 minโŒ„

What you will learn

  • sort() and find()
  • count and count_if
  • Lambda expressions
  • Iterators with algorithms
  • Algorithm complexity overview
Example code ยท C++
#include <algorithm>
#include <iostream>
#include <vector>
int main() {
    std::vector<int> values{5, 2, 9, 1};
    std::sort(values.begin(), values.end());
    for (int n : values) std::cout << n << ' ';
}
โœ๏ธ PRACTICE TASK

Sort student marks and use a lambda to count scores above a threshold.

21File Handling and StreamsRead and write text files using C++ streams.Advanced50 minโŒ„

What you will learn

  • ifstream, ofstream and fstream
  • Opening and closing files
  • Reading lines with getline()
  • Checking stream status
  • Basic file-based record storage
Example code ยท C++
#include <fstream>
#include <iostream>
int main() {
    std::ofstream file("notes.txt");
    if (!file) return 1;
    file << "C++ file handling practice\n";
    file.close();
    std::cout << "File written\n";
}
โœ๏ธ PRACTICE TASK

Save several student records to a text file and read them back.

22Exception HandlingHandle exceptional conditions with controlled error paths.Advanced45 minโŒ„

What you will learn

  • try and catch
  • throw expressions
  • Standard exception types
  • RAII and resource safety
  • When not to use exceptions
Example code ยท C++
#include <iostream>
#include <stdexcept>
double divide(double a, double b) {
    if (b == 0) throw std::invalid_argument("Division by zero");
    return a / b;
}
int main() {
    try { std::cout << divide(10, 2); }
    catch (const std::exception& e) { std::cerr << e.what(); }
}
โœ๏ธ PRACTICE TASK

Create a safe division function that reports invalid input.

23Modern C++: auto, nullptr and Smart PointersMeet modern C++ features that make code clearer and resource management safer.Advanced55 minโŒ„

What you will learn

  • auto type deduction
  • nullptr
  • Range-based for loops
  • unique_ptr and shared_ptr overview
  • Move semantics introduction
Example code ยท C++
#include <iostream>
#include <memory>
int main() {
    auto value = 42;
    auto item = std::make_unique<int>(value);
    std::cout << *item << '\n';
}
โœ๏ธ PRACTICE TASK

Use unique_ptr to manage a dynamically created object without calling delete manually.

24Debugging, Testing and Clean CodeImprove reliability with compiler warnings, tests and readable structure.Advanced40 minโŒ„

What you will learn

  • Compiler warnings
  • Breakpoints and stepping
  • Assertions and test cases
  • Naming and function size
  • Boundary cases and input validation
Example code ยท C++
#include <cassert>
int square(int n) { return n * n; }
int main() {
    assert(square(4) == 16);
    assert(square(0) == 0);
}
โœ๏ธ PRACTICE TASK

Write tests for a function, including zero, negative and boundary inputs.

25Final C++ ProjectsCombine language features into complete console applications.ProjectsSelf-pacedโŒ„

What you will learn

  • Student management system
  • Library management system
  • Bank account simulator
  • Quiz application
  • Inventory manager using STL and files
  • Project documentation and testing
Example code ยท C++
#include <iostream>
int main() {
    int choice = -1;
    while (choice != 0) {
        std::cout << "\n1. Add record\n2. View records\n0. Exit\nChoice: ";
        if (!(std::cin >> choice)) return 1;
        // Implement each menu action in a separate function.
    }
    return 0;
}
โœ๏ธ PRACTICE TASK

Choose a project, plan its classes/functions, validate input and test edge cases.

Build something real

C++ Project Ideas

Combine the chapters into projects that practise object-oriented design, data structures and file operations.

PROJECT 01

Student Management

Use classes and file streams to add, search and display student records.

PROJECT 02

Library Management

Track books, issue status and search results with suitable STL containers.

PROJECT 03

Bank Account Simulator

Model deposits, withdrawals and balance checks using encapsulation.

PROJECT 04

Quiz Application

Build question flow, scoring and result summaries.

PROJECT 05

Inventory Manager

Store products, search inventory and save records to a file.

PROJECT 06

Shape Calculator

Use inheritance and virtual functions to calculate shape areas.

Ready to build with C++?

Follow the chapters in order, practise each task and turn your concepts into working projects with AIFA Infotech.