The Standard C++ Library: Generic algorithms
Algorithms are at the core of computing. To be able to write an algorithm once and for all to work […]
C++ is one of the most powerful and widely used programming languages in the world. Built on the foundation of C, it adds object-oriented programming, generic programming through templates, and the rich Standard Template Library — making it the language of choice for game development, systems programming, high-frequency trading, real-time applications, and performance-critical software.
MYCPLUS has been one of the web’s longest-running C++ programming resources, publishing tutorials, source code examples and practical guides since 2004. This section covers everything from the absolute basics of C++ syntax through to modern C++ features introduced in C++11, C++14, C++17 and beyond. You will find clear explanations of classes, inheritance, polymorphism and encapsulation, practical STL container and algorithm examples, and real-world source code that demonstrates how C++ is used in professional software development.
Whether you are a student learning C++ for the first time, a C programmer making the transition to object-oriented development, or an experienced developer exploring modern C++ features like smart pointers, move semantics and lambda expressions — this section has the resources you need to level up your C++ skills.
Why MYCPLUS: One of the web’s longest-running C++ resources — trusted since 2004 with hundreds of tutorials, examples and source code projects built for real learning.
Algorithms are at the core of computing. To be able to write an algorithm once and for all to work […]
This is a simple C++ program to make a car race game. It uses object oriented approach to generate different objects in the game such as using Car, Obstacle and Timer classes.
SWAT GAME /******************************************************* * MYCPLUS Sample Code – https://www.mycplus.com * * * * This code is made available as a
This C++ date class is intended to illustrate how to write a non- trivial class in C++. Even though this
The following C++ program demonstrates the concept of constructors and destructors in C++.
Simple class program /******************************************************* * MYCPLUS Sample Code – https://www.mycplus.com * * * * This code is made available as
In order to keep the program as simple as possible, all of the member methods are defined as inline functions.?
program, the objects are instantiated from an?inherited class and the intent of this program? is to illustrate that there is
Demonstration of inheritance in c++. This example contains the following files. VEHICLE.H VEHICLE.CPP ALLVEHIC.CPP CAR.H CAR.CPP TRANSPORT.CPP TRUCK.H TRUCK.CPP Vehicle.h
The basic concept of multiple inheritance (MI) sounds simple enough: you create a new type by inheriting from more than
This is a special console based utility which will calculate the Message Digest, Base 64 Encoding and Decoding, Checks the
This is a C++ implementation of various sorting algorithms. The list of algorithms include Bubble Sort, Heap Sort, Selection Sort, Insertion Sort, Quick Sort, Merge Sort and Shell Sort. A brief description of each sorting algorithm is listed below along with their complexity.