User Tools

Site Tools


cpp

C++ Learning Programme (3 Months)

This programme is designed to refresh your C++ knowledge, focusing on understanding complex code and writing simple code by the end of the programme. It is split into 3 phases, each lasting 1 month, with corresponding exercises, resources, and goals.

Phase 1: Fundamentals and Syntax Refresh

Duration: 4 weeks

Goal: Relearn C++ syntax, basic constructs, and simple problem-solving.

  • Topics to Cover:
    1. C++ basic syntax (variables, data types, control structures)
    2. Functions, pointers, references
    3. Object-Oriented Programming (OOP): Classes, inheritance, polymorphism
    4. Memory management (stack vs heap)
    5. Basic input/output operations (streams)
  • Resources:
    1. LearnCPP.com: Beginner-friendly tutorials
    2. C++ Reference: For in-depth explanations
    3. Book: “Programming: Principles and Practice Using C++” by Bjarne Stroustrup (optional)
  • Exercises:
    1. Simple console applications (calculators, loops, conditionals)
    2. Rebuild classic data structures (linked list, stack, queue) using C++
    3. Implement small OOP examples (e.g., a simple class hierarchy with inheritance)
  • Projects:
    1. Write a small program to manage basic bank transactions (using classes and file I/O)

Phase 2: Intermediate Concepts and Standard Library

Duration: 4 weeks

Goal: Dive deeper into intermediate C++ topics and master the Standard Library (STL).

  • Topics to Cover:
    1. Templates and Generic Programming
    2. Standard Template Library (STL): Vectors, Lists, Maps, Sets
    3. Error handling (exceptions)
    4. Smart pointers (unique_ptr, shared_ptr)
    5. Basic Multithreading (std::thread, mutex)
  • Exercises:
    1. Implement data structures using STL (e.g., using `std::vector`, `std::map`)
    2. Create simple template classes/functions
    3. Experiment with `std::thread` and `mutex` to manage simple multithreading tasks
  • Projects:
    1. Write a program that simulates a small library system, using STL containers and smart pointers
    2. Practice using exceptions for error handling in more complex scenarios

Phase 3: Advanced Concepts and Code Reading

Duration: 4 weeks

Goal: Get comfortable with more advanced C++ concepts, focus on reading and understanding complex codebases.

  • Topics to Cover:
    1. Lambda functions and functional programming
    2. Move semantics and R-value references
    3. Advanced memory management (manual allocation and deallocation)
    4. Reading and contributing to open-source C++ projects
    5. Debugging and profiling C++ code
  • Exercises:
    1. Analyze complex C++ code in open-source projects (focusing on reading, not just writing)
    2. Solve more complex coding challenges using C++ (check websites like LeetCode, Codeforces)
    3. Debug C++ programs and profile performance using tools like `gdb` and `valgrind`
  • Projects:
    1. Contribute small patches or improvements to open-source C++ projects
    2. Implement a simple task scheduler or a basic version of a task queue using C++ threads

Tools and Environments

  • IDE/Editor:
    1. Recommended: Visual Studio Code with the C++ extension, or CLion
    2. Compilers:
      1. GCC (Linux) or Clang
      2. For Windows: MinGW or MSVC
  • Build Systems:
  1. Get familiar with using CMake for project management and building larger C++ projects.

End of Programme Goal

At the end of this 3-month programme, you should be able to:

  1. Read and understand moderately complex C++ codebases
  2. Write simple C++ programs using modern C++ practices (C++11/14/17)
  3. Feel comfortable contributing to open-source C++ projects or debugging complex C++ applications.
cpp.txt · Last modified: by jotasandoku