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

How To Use std::align In Modern C++

The C++11 standard introduced alignment support as one of the many features of a Modern compiler for the C++ programming language. One of the new features of this support is a new keyword align std::align which is used to get a pointer aligned by the specifiedalignmentfora sizein bytes in consider with size of the buffer. In this post, we explain how we can use align in…
Read more
C++C++11C++14C++17C++20Introduction to C++Learn C++Syntax

Everything You Need To Know About Strongly Typed Enums In Modern C++

Variable declaration is important in programming and there is an enumeration method that allows you to numerate/count variables easily. In C++, enumeration is very important and widely used in different syntaxes. Enumeration in C++ can be done with the enum keyword which can be used to create unscoped and scoped enumerations. C++11 and above has modern enumeration methods that can be easily used…
Read more
C++C++11C++14C++17C++20Introduction to C++Learn C++Syntax

Learn What A Null Pointer Constant (nullptr) Is In Modern C++

C++ is an amazing programming language. Variables and memory usage are important in programming, and how we handle these are improved in every C++ standard. One of the great features is null pointer constants in modern C++ which was introduced with the C++11 standard. In this post, we explain what a null pointer constant (nullptr ) is with very simple examples. You can learn C++ and follow along…
Read more
C++C++17C++20Learn C++

This Is How To Use std::map In Modern C++

Modern C++ is amazingly powerful with many great features to help you write programs more easily with fewer errors. In C++, the Standard Template Library or STL has many algorithms for operations like searching, counting, and manipulation of ranges and their elements. In this Learn C++ post we show you a feature called std::map that you can use to pair elements. What is a container in modern…
Read more