C++C++11C++14C++17C++20IteratorsLearn C++Templates

What Is Atomic (std::atomic) In Modern C++?

In modern C++, the concurrency support library is designed to solve problems in multi-thread operations. This library includes built-in support forthreads (std::thread), atomic operations (std::atomic), mutual exclusion (std::mutex), condition variables (std::condition_variable),and many other features of a modern C++ compiler. In this post, we explain what is std::atomic and how we…
Read more
C++C++11C++14C++17Introduction to C++Learn C++

How To Learn initializer_list (std::initializer_list) In Modern C++

C++ has some really great features for being able to define different types of variables and structure. One of the most used and very useful arrays in C++ is the std::vector. If you know arrays in C and C++, then containers are a modern and very flexible form of arrays in C++. If you want to initialize containers like vector, list, map, etc. you need use std::initializer_list. It can be used with…
Read more
C++C++17Introduction to C++Learn C++

How To Sort C++ Vectors With std::sort Parallel Sorting

Modern C++ is an amazing programming language with many powerful features. In C++, the Standard Template Library or STL has many algorithms for operations like searching, counting, and manipulation of ranges and their elements. C++17 has a new feature in the STL which allows you to sort vectors with the std::sort Parallel Sorting Algorithm. Both vectors and arrays can be sorted by the std::sort…
Read more
C++Introduction to C++Language FeatureLearn C++

How To Set And Print Vector Members On Windows

Arrays and structs in C++ are explained well in our previous posts. These functions originally came from the C. In this post, we will explain another great feature of C++, The Vectors. Vectorsare dynamic arrays included in<vector> libraryin modern C++ and they can resize themselves automatically when a member of a vector is inserted or deleted. Vectors are the same…
Read more