C++C++11C++14C++17Learn C++Syntax

What Are Useful Atomic Load And Store Operations In C++?

The concurrency support library in modern C++ is designed to solve problems in multi-thread operations. Since the C++11 standard, this library includes built-in support forthreads (std::thread) with atomic operations (std::atomic). In this post, we explain what two atomic operations that can be used with std::atomic types, we explain what are atomic load and store operations. What is…
Read more
C++C++11C++14C++17Learn C++

Learn To Use Predefined Identifier __func__ In C++

Modern C++ has a lot of features that can be used in professional programming. C++11 standard improved the previous C99 standard feature __func__ which is a predefined identifier for functions or methods. The predefined identifier __func__ returns as a string that contains the name of the enclosing function or method. In this post, we explain how we can use predefined identifier…
Read more
Artificial Intelligence TechC++C++11C++14C++17C++20IteratorsLearn C++Syntax

How To Use std::thread In Modern C++?

In modern mathematics, physics, and computer science; optimized and fasterapp developmentin programming is very important to speed up computations. CPUs and GPUs are highly evolved by the number of cores and transistors to give more computational power to today’s servers and computers. Thus, we can use more cores and threads in our applications by using std::thread. We can use…
Read more
C++C++11C++14C++17C++20Learn C++Syntax

How To Use std::thread With std::vector In Multi-Thread C++ Operations

In C++, vectors are a modern and very flexible form of array inmodern C++. Maybe we can say they are like modern linked lists. We can use vectors with std::thread classes for multi-thread operations. In this post, we have a very good example that shows how you can use std::thread and std::vector together. First, let’s remind ourselves about vectors and threads in C++. What is…
Read more