
This section welcomes students to Build AI-Powered Applications in Modern C++ and sets the foundation for everything that follows. Students learn who the course is for, what prior knowledge is expected, what hardware and software is required, how to manage costs using OpenAI and Ollama, and what they will build across five hands-on projects. The section concludes with an overview of how source code, lecture resources, and corrections are organized so students know exactly where to find everything they need.
This lecture sets clear expectations about the prior knowledge required and defines the scope of the course. Students learn what this course is, what it deliberately is not, why the code and design are kept simple on purpose, and how object-oriented design is introduced gradually from the ground up.
This lecture covers everything students need on their machine before writing a single line of code. Topics include hardware requirements for running Ollama locally, the CLion IDE, the supporting toolchain including CMake, vcpkg, Git, and OpenSSL, Docker requirements by platform for the RAG project, and the two key libraries used throughout the course: nlohmann-json and cpp-httplib.
This lecture explains the two AI backends supported throughout the course. Students learn how OpenAI pricing works, how to set hard and soft spending limits to stay in control of costs, and how Ollama provides a completely free local alternative with no API fees, no account required, and full privacy. All five projects support both backends.
This lecture provides a complete tour of the course curriculum and the five hands-on projects students will build. Each project is introduced individually: the function-based ChatBot, the OOP ChatBot refactoring, the Writing Assistant, the MasterChef Recipe Generator, and the RAG system. Students also learn how source code is provided, how lecture resources are organized, and how corrections are communicated.
This lecture introduces the key video player controls that make learning a technical course easier. Topics include playback speed adjustment, the 5-second rewind button, pausing to study displayed code, the transcript feature, captions, the notes and bookmarks feature, and video quality settings for slower connections.
This lecture explains how to use the Q&A section effectively. Students learn to search before posting, how to write a clear and detailed question, how to include error messages and formatted code, and what kinds of questions belong in the Q&A versus what should go to Udemy Support.
This lecture covers how to find and download lecture resources, why checking the resources section before posting a question can save time, how source code is provided and how to use it alongside the lectures, and how to use the notes and bookmarks features to stay organized throughout the course.
This lecture explains the short quizzes placed after the key lectures. Students learn that they are low-pressure knowledge checks, not graded exams, that they focus on the big-picture reasoning behind each topic with a few applied code questions, and that every answer choice includes an explanation. It encourages retaking quizzes freely and revisiting a lecture whenever a question reveals a gap.
This lecture clarifies which support channel to use for different types of issues. Students learn what Udemy Support handles, what to bring to the course Q&A, and the limitations of the Udemy AI assistant for course-specific technical questions.
This lecture provides practical advice for getting the most out of the course. Topics include why skipping sections causes problems later, how code is presented and why pausing is the right approach, the importance of attempting the suggested exercises at the end of each section, creating your own exercise variations to deepen practice, and a note on the timing of Udemy's review prompts.
This section provides an overview of the Windows development environment setup process and outlines the tools required to build modern C++ AI applications.
In this lecture, students install and configure the Visual Studio Build Tools to obtain the MSVC compiler, CMake, and supporting toolchains needed for C++ development.
This lecture covers installing Git and verifying that source control commands are accessible from the command line
Students install and configure vcpkg to manage external C++ libraries, enabling consistent and reproducible dependency builds across projects.
This lecture walks through installing OpenSSL using vcpkg and validating that cryptographic functionality is correctly linked for secure API communication.
Students install JetBrains CLion and configure it to use the Windows toolchain and CMake for building and debugging C++ projects.
In this video I show you how to download, unip, and copy th provided course sourec code to your WIndows PC.
This section discusses how anti-virus software can interfere with builds and package installs, along with recommended exclusions to prevent development slowdowns or false positive detections.
In this final lecture, students build and run a validation project to confirm that all tools and libraries are correctly installed and working together.
In this video we show you how to easiliy create a new project from the provided EmptyProject template project.
This section provides an overview of setting up a complete C++ development environment on macOS and introduces the tools required to build modern AI-enabled applications.
In this lecture, students install Apple’s Xcode Command Line Tools to enable access to the Clang compiler, standard libraries, and essential build utilities.
This lecture covers installing Homebrew, the macOS package manager used to streamline the installation and maintenance of development libraries and utilities.
Students install Git for version control, CMake for cross-platform project builds, and pkg-config for resolving external library metadata and linking paths.
This lecture walks through installing and configuring vcpkg to manage third-party C++ dependencies consistently across macOS development projects.
Students install OpenSSL through vcpkg and verify correct compilation and linking for secure HTTPS communication in C++ applications.
This lecture guides students through installing and configuring JetBrains CLion to use the macOS toolchain and CMake for efficient development and debugging of C++ projects.
In this video I show you how to download, unip, and copy th provided course sourec code to your MAC.
In this final lecture, students build and run a validation project to confirm that all tools and libraries are correctly installed and working together.
In this video we show you how to easiliy create a new project from the provided EmptyProject template project.
This section provides an overview of configuring a complete C++ development environment on Ubuntu Linux and introduces the required tools for building AI-enabled applications.
In this lecture, students install essential development packages including GCC/Clang, make, and CMake to enable compiling and building modern C++ projects on Ubuntu.
Students install and configure vcpkg to manage third-party C++ libraries, ensuring consistent and reproducible dependency handling across Linux-based projects.
This lecture walks through installing OpenSSL via vcpkg and validating correct linking to enable secure HTTPS communication from C++ applications
Students install JetBrains CLion and configure it to use the Ubuntu compiler toolchain and CMake build system for debugging and development.
In this video I show you how to download, unip, and copy th provided course sourec code to your Ubuntu PC.
In this final lecture, students build and run a validation project to confirm that all tools and libraries are correctly installed and working together.
In this video we show you how to easiliy create a new project from the provided EmptyProject template project.
In this video, you'll learn why JSON is the universal data format for AI applications and how it enables communication with powerful AI APIs.
In this lecture, students will learn several methods to create JSON objects, and how to print them in both compact and pretty formats.
In this video, you'll master creating nested objects, arrays of objects, and multi-level JSON structures for real-world applications.
In this lecture, students will learn how to read values from JSON objects and arrays using square bracket notation and chaining .at() methods for nested data.
In this video, students will learn to use .at(), .contains(), .value(), and type checking to write robust, error-resistant production code. We will also see how we can use exception-handling and best practices.
In this lecture, students will learn to loop through arrays and objects using range-based for loops and .items() for key-value iteration.
This hands-on project challenges you to work with a nested JSON game leaderboard structure, where you'll implement three functions to display players, show individual player statistics, and find top scores across games. You'll practice essential JSON traversal techniques including iterating through objects with .items(), safely accessing nested data, and handling optional field, with the choice to implement using either defensive checking or exception handling approaches
In this video,willl review the key concepts and best practices for working with JSON in AI-powered C++ applications.
In this video, you'll learn what HTTP is, why it's essential for AI applications, and how cpp-httplib enables C++ programs to communicate with cloud-based AI services.
In this lecture, students will learn to make HTTP GET requests to retrieve data from servers, validate responses by checking status codes, and parse JSON response bodies using the skills learned in the previous section.
In this video, you'll learn to send data to servers using POST requests, serialize JSON objects into request bodies, and handle server responses including understanding different status codes like 201 Created.
In this lecture, students will learn the difference between HTTP and HTTPS, understand the TLS handshake process, and master secure API key management using environment variables across Windows, macOS, and Linux platforms.
In this video, you'll learn to make encrypted HTTPS requests using SSLClient, work with real cloud APIs requiring authentication, and safely include API keys from environment variables in your requests.
In this lecture, students will learn to send data securely to cloud APIs using HTTPS POST requests, combining JSON serialization, authentication headers, and encrypted communication for production-ready AI integration.
In this video, you'll learn production-ready practices including comprehensive error handling, timeout configuration, custom headers, handling different HTTP status codes, and debugging techniques for troubleshooting API communication issues.
This hands-on project challenges you to build a complete weather information application that makes authenticated HTTPS requests to a real weather API, parses nested JSON responses, handles errors gracefully, and displays formatted results. You'll practice essential skills including environment variable management, secure API communication, nested JSON traversal, and production-ready error handling.
In this video, we'll review the key concepts and best practices for making HTTP and HTTPS requests in C++ applications, and preview how these skills will be used to integrate OpenAI and other AI services in upcoming sections.
In this video, you'll get an overview of OpenAI's capabilities and understand that the API is a paid service. You'll learn about the free Ollama alternative covered in Section 9, allowing you to make an informed choice between cloud-based and local AI solutions before proceeding with account setup.
Creating Your OpenAI Account and Managing API Keys In this lecture, students will learn to create an OpenAI account, generate and secure API keys using best practices, set hard and soft spending limits to control costs, and configure email notifications to monitor usage and prevent unexpected charges.
In this video, you'll learn to navigate OpenAI's API documentation, understand critical request fields (model, messages, temperature, max_tokens), interpret response fields (choices, usage, finish_reason), and handle common error codes (401, 429, 400, 500, 503) for robust API integration.
In this video, you'll learn what tokens are and how they differ from words, understand input and output token pricing, visualize the scale of 1 million tokens in relatable terms, calculate actual costs for typical usage patterns, manage context windows effectively, and implement strategies to monitor and reduce API costs during development.
In this lecture, students will learn to select appropriate models for different use cases, comparing GPT-4o-mini and GPT-4o for chat completions, and text-embedding-3-small and text-embedding-3-large for embeddings, with emphasis on balancing cost and performance for development and production scenarios.
n this video, We start from a clean C++ scaffold and focus on building a valid /v1/responses request using nlohmann::json. You will see how to safely read an API key, define a prompt, and serialize a structured JSON payload that is ready to send to OpenAI.
In this video, we send our request to OpenAI using cpp-httplib’s SSLClient. We configure HTTPS, add authorization headers, handle connection errors, and verify HTTP status codes while receiving a raw JSON response.
We finish the program by extracting output_text from the response’s output array and displaying the final result. This video demonstrates robust, future-proof response parsing in modern C++.
In this video, you'll discover what Ollama is and understand its key advantages: zero cost with no API fees, complete privacy with everything running locally, offline capability after initial setup, no rate limits for unlimited experimentation, and OpenAI-compatible API ensuring your C++ code works with both platforms. You'll also understand the trade-offs including hardware requirements and manual model updates, helping you choose between Ollama and cloud-based services.
In this lecture, students will learn to download and install Ollama on Windows, verify the installation and service status, pull their first model using the command line.
In this video, you'll learn to install Ollama on macOS (Intel and Apple Silicon), verify installation through terminal and pull recommended models.
In this video, you'll learn to install Ollama on Ubuntu Linux, verify installation through terminal and pull recommended models.
In this video, you'll understand the model naming format (modelname:tag like llama3.2:3b), explore three recommended starting models (llama3.2:3b for chat, deepseek-r1:1.5b for reasoning, nomic-embed-text for embeddings), match models to your hardware (8GB RAM → 3B models, 16GB RAM → 7B models), and master essential commands: ollama pull, ollama list, ollama run, ollama rm, and ollama show. You'll learn the "start small strategy" of beginning with faster, smaller models with upgrade flexibility.
In this video, you'll refactor the OpenAI application from Section 8 to work with Ollama. You'll make just a few precise changes: update the endpoint from api.openai.com to localhost:11434, change the model name to llama3.2:3b, remove API key authentication, and switch from SSLClient to standard Client for HTTP. This demonstrates how easily your C++ code transfers between cloud and local AI solutions with minimal modification.
Transform a monolithic ChatBot application into clean, modular code through three progressive phases. Learn the refactoring roadmap: Phase 1 extracts configuration into dedicated structures, Phase 2 decomposes logic into focused functions, and Phase 3 organizes code into reusable modules. Discover how incremental refactoring maintains working code while improving design. Preview the final architecture supporting both OpenAI and Ollama providers through function-based design that prepares you for object-oriented programming.
Extract hardcoded values into a dedicated ApiConfig struct, centralizing provider, model, API key, host, and endpoint configuration. Implement safe_getenv() for secure environment variable access. Eliminate magic strings and apply the single source of truth principle. Test with both OpenAI and Ollama configurations to validate provider-agnostic design. Learn how proper configuration management enables runtime flexibility and code maintainability.
Decompose monolithic code into focused, reusable functions following the Single Responsibility Principle. Create build_request_payload() for JSON construction, send_http_request() for API communication, parse_response() for result extraction, and ask() for high-level orchestration. Master function signature design, const-correctness, parameter passing, and error handling. Learn how function decomposition enables code reuse, independent testing, and simplified debugging.
Extract refactored code from main.cpp into separate header and implementation files. Clean up main.cpp to focus only on application logic. Test the modular system with both OpenAI and Ollama to verify proper organization.
In this video we recap the refactoring we did for this project, Students are given 3 exercise ideas that they can add to this project on their own to practice the skills they have learned. And finally, we get a preview of the next projects which will refactor this function-based solution to an Object-Oriented solution.
Build AI-Powered Applications in Modern C++
Ready to take your C++ skills into the world of Artificial Intelligence?
In this hands-on course, you’ll learn how to build real AI-powered applications in modern C++ by working directly with AI APIs, HTTP/HTTPS communication, JSON, embeddings, vector representations, and Retrieval-Augmented Generation (RAG).
Instead of hiding the complexity behind pre-built AI SDKs or wrapper libraries, this course takes an internals-first approach. You’ll see exactly how requests are constructed, how JSON data is exchanged, how responses are parsed, and how AI services can be integrated into a C++ application.
You’ll also learn how to connect C++ applications to OpenAI GPT models and run AI models locally using Ollama, giving you the flexibility to work with cloud-based or local AI.
What You’ll Build
Throughout the course, you’ll progressively build five complete AI-powered C++ projects, with each project introducing new concepts and extending the architecture of the previous one.
You’ll learn how to:
Build AI applications using C++ and the OpenAI API
Run AI models locally with Ollama
Send and process HTTP/HTTPS requests directly from C++
Work with JSON using the industry-standard nlohmann-json library
Build and parse structured AI responses
Create embeddings and perform similarity searches
Build a complete Retrieval-Augmented Generation (RAG) system from scratch in C++
Apply the Builder Pattern with method chaining
Progress from simple procedural code to well-structured object-oriented applications
Apply dependency injection and composition in real projects
Design applications that can support multiple AI backends with minimal code changes
Why This Course Is Different
Most AI application development courses rely heavily on Python, wrapper libraries, or pre-built SDKs.
This course takes a different approach.
You’ll build a complete RAG pipeline in C++, giving you a deeper understanding of how modern AI applications actually work while demonstrating that C++ is a powerful choice for AI application development.
You’ll also build the same chatbot progressively - from a monolithic implementation, to functions, and finally to a full object-oriented design. This allows you to see why architectural improvements matter and when to apply them.
All five projects support both OpenAI and Ollama, allowing you to switch between cloud-based and local AI with minimal configuration changes.
By the end of the course, you won’t simply know how to call an AI API. You’ll understand the underlying technologies well enough to integrate new AI services independently as APIs, models, and tools continue to evolve.
What You’ll Need
You should have intermediate C++ knowledge, including variables, functions, loops, conditionals, and basic classes. Beginner-level familiarity with pointers and references is also recommended.
You’ll need a computer capable of running CLion and Docker Desktop, with at least 8 GB of RAM (16 GB recommended) and approximately 15–20 GB of available disk space.
No previous AI or machine learning experience is required.
No Python knowledge is required.
No GPU is required.
By the End of This Course
You’ll have practical experience building AI-powered applications in C++ and a portfolio of projects demonstrating your ability to integrate modern AI technologies into real software.
More importantly, you’ll develop the architectural understanding and confidence to go beyond this course and build your own AI-powered C++ applications.
If you’re ready to combine the power of C++ with modern AI, this course will give you the practical skills and foundation to get started.