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

What Is make_unique And How To Use With unique_ptr In C++

Allocating memory and freeing it safely is hard if you are programming a very big application. In Modern C++ there are smart pointers that help avoid the mistake of incorrectly freeing the memory addressed by pointers. Smart pointers make it easier to define and manage pointers, they came with C++11. The most used types of C++ smart pointer areunique_ptr, auto_ptr, shared_ptr, and weak_ptr.
Read more
C++C++14C++17C++20Learn C++

What Is Aggregate Member Initialization In C++?

The Aggregate Member Initialization is one of the features of C++. This feature is improved and modernized with C++11, C++14 and C++20. With this feature, objects can initialize an aggregate member from braced-init-list. In this post, we explain what the aggregate member initialization is and what were the changes to it in modern C++ standards. What is aggregate member initialization in modern…
Read more
C++C++14C++17C++20Generic ProgrammingLearn C++Syntax

Learn How To Use Generic Lambdas In Modern C++

Lambda Expressions allow users to write an inline expression that can be used for short snippets of code in your C++ app which are not going to be reused and don’t require naming. The Lambda Expression construct is introduced in C++ 11 and further developed in the C++14, C++17, and C++20 standards. In C++14, lambda expressions are improved by the generalized lambda (generic lambda) or…
Read more
C++C++11C++14C++17C++20Learn C++

Learn The Useful Integer Literals In Modern C++

A programming language consists of a lot of expressions in our source code. One of elements of expressions in C++ are literals. A more specific type of literal is Integer Literals. Integer literals are primary expressions that allow values of integer types (i.e., decimal, octal, hexadecimal) to be used in expressions directly. They are further improved by the boolean literals (binary digits) in…
Read more